UNPKG

sgod-library-frontend

Version:
31 lines (30 loc) 762 B
declare const ENTITY_ERROR_STATUS = 422; type EntityErrorPayload = { message: string; errors: { field: string; message: string; }[]; }; export declare class HttpError extends Error { status: number; payload: { message: string; [key: string]: any; }; constructor({ status, payload, message, }: { status: number; payload: any; message?: string; }); } export declare class EntityError extends HttpError { status: typeof ENTITY_ERROR_STATUS; payload: EntityErrorPayload; constructor({ status, payload, }: { status: typeof ENTITY_ERROR_STATUS; payload: EntityErrorPayload; }); } export { ENTITY_ERROR_STATUS }; export type { EntityErrorPayload };