UNPKG

@dvsa/appdev-api-common

Version:

Utils library for common API functionality

22 lines (21 loc) 590 B
import { HttpStatus } from "../api/http-status-codes"; type RoleInfo = { required: string[]; actual: string[]; }; export declare class AuthError extends Error { private readonly statusCode; private readonly code; private readonly roleInfo?; constructor(statusCode?: HttpStatus, message?: string, code?: string, roleInfo?: RoleInfo | undefined); toJSON(): { error: { name: string; code: string; message: string; statusCode: number; roleInfo: RoleInfo | undefined; }; }; } export {};