UNPKG

@serafin/pipeline

Version:

CRUD data access library with a functional approach

17 lines (16 loc) 1.3 kB
import VError from "verror"; export declare function error(name: string, message: string, info?: any, cause?: any): VError; export declare const NotFoundErrorName = "SerafinNotFoundError"; export declare function notFoundError(id: string, info?: any, cause?: Error): VError; export declare const ValidationErrorName = "SerafinSchemaValidationError"; export declare function validationError(validationError: string, info?: any, cause?: Error): VError; export declare const ConflictErrorName = "SerafinConflictError"; export declare function conflictError(id: string, info?: any, cause?: Error): VError; export declare const NotImplementedErrorName = "SerafinNotImplementedError"; export declare function notImplementedError(method: string, sourceName: string, info?: any, cause?: Error): VError; export declare const UnauthorizedErrorName = "SerafinUnauthorizedError"; export declare function unauthorizedError(reason: string, info?: any, cause?: Error): VError; export declare const ForbiddenErrorName = "SerafinForbiddenError"; export declare function forbiddenError(reason: string, info?: any, cause?: Error): VError; export declare const MovedPermanentlyErrorName = "SerafinMovedPermanentlyError"; export declare function movedPermanentlyError(newResource: string, info?: any, cause?: Error): VError;