UNPKG

rfc9457

Version:

RFC 9457 Problem Details for HTTP APIs - A standardized error handling package for Node.js

61 lines 5.51 kB
export declare const errors: { client: { validate: (detail: unknown, validationErrors?: import("./index.js").ValidationErrors) => import("./errors/index.js").ValidationError; permission: (detail: unknown) => import("./errors/index.js").AuthorizationError; access: (detail: unknown) => import("./errors/index.js").AuthorizationError; idNotFound: (resourceOrDetail: unknown, id?: string) => import("./errors/index.js").NotFoundError; duplicate: (detail: unknown) => import("./errors/index.js").ConflictError; thirdParty: (detail: unknown) => import("./errors/index.js").FailedDependencyError; badRequest: (detail: unknown) => import("./errors/index.js").BadRequestError; paymentRequired: (detail: unknown) => import("./errors/index.js").PaymentRequiredError; authentication: (detail: unknown) => import("./errors/index.js").AuthenticationError; authorization: (detail: unknown) => import("./errors/index.js").AuthorizationError; notFound: (resourceOrDetail: unknown, id?: string) => import("./errors/index.js").NotFoundError; methodNotAllowed: (detail: unknown) => import("./errors/index.js").MethodNotAllowedError; notAcceptable: (detail: unknown) => import("./errors/index.js").NotAcceptableError; proxyAuthenticationRequired: (detail: unknown) => import("./errors/index.js").ProxyAuthenticationRequiredError; requestTimeout: (detail: unknown) => import("./errors/index.js").RequestTimeoutError; conflict: (detail: unknown) => import("./errors/index.js").ConflictError; gone: (detail: unknown) => import("./errors/index.js").GoneError; lengthRequired: (detail: unknown) => import("./errors/index.js").LengthRequiredError; preconditionFailed: (detail: unknown) => import("./errors/index.js").PreconditionFailedError; payloadTooLarge: (detail: unknown, maxSize?: number) => import("./errors/index.js").PayloadTooLargeError; uriTooLong: (detail: unknown) => import("./errors/index.js").UriTooLongError; unsupportedMediaType: (detail: unknown) => import("./errors/index.js").UnsupportedMediaTypeError; rangeNotSatisfiable: (detail: unknown) => import("./errors/index.js").RangeNotSatisfiableError; expectationFailed: (detail: unknown) => import("./errors/index.js").ExpectationFailedError; misdirectedRequest: (detail: unknown) => import("./errors/index.js").MisdirectedRequestError; validation: (detail: unknown, validationErrors?: import("./index.js").ValidationErrors) => import("./errors/index.js").ValidationError; locked: (detail: unknown) => import("./errors/index.js").LockedError; failedDependency: (detail: unknown) => import("./errors/index.js").FailedDependencyError; tooEarly: (detail: unknown) => import("./errors/index.js").TooEarlyError; upgradeRequired: (detail: unknown) => import("./errors/index.js").UpgradeRequiredError; preconditionRequired: (detail: unknown) => import("./errors/index.js").PreconditionRequiredError; rateLimit: (detail: unknown, retryAfter?: number) => import("./errors/index.js").RateLimitError; requestHeaderFieldsTooLarge: (detail: unknown) => import("./errors/index.js").RequestHeaderFieldsTooLargeError; unavailableForLegalReasons: (detail: unknown) => import("./errors/index.js").UnavailableForLegalReasonsError; }; server: { db: (detail: unknown) => import("./errors/index.js").ServiceUnavailableError; fetch: (detail: unknown, service?: string) => import("./errors/index.js").BadGatewayError; envNotSet: (detail: unknown) => import("./errors/index.js").NotImplementedError; envInvalid: (detail: unknown) => import("./errors/index.js").NotImplementedError; maintenance: (detail: unknown, retryAfter?: number) => import("./errors/index.js").ServiceUnavailableError; migration: (detail: unknown) => import("./errors/index.js").InsufficientStorageError; unhandledRejection: (detail: unknown) => import("./errors/index.js").InternalServerError; uncaughtException: (detail: unknown) => import("./errors/index.js").InternalServerError; internal: (detail: unknown) => import("./errors/index.js").InternalServerError; notImplemented: (detail: unknown) => import("./errors/index.js").NotImplementedError; badGateway: (detail: unknown, service?: string) => import("./errors/index.js").BadGatewayError; serviceUnavailable: (detail: unknown, retryAfter?: number) => import("./errors/index.js").ServiceUnavailableError; gatewayTimeout: (detail: unknown, service?: string) => import("./errors/index.js").GatewayTimeoutError; httpVersionNotSupported: (detail: unknown) => import("./errors/index.js").HttpVersionNotSupportedError; variantAlsoNegotiates: (detail: unknown) => import("./errors/index.js").VariantAlsoNegotiatesError; insufficientStorage: (detail: unknown) => import("./errors/index.js").InsufficientStorageError; loopDetected: (detail: unknown) => import("./errors/index.js").LoopDetectedError; notExtended: (detail: unknown) => import("./errors/index.js").NotExtendedError; networkAuthenticationRequired: (detail: unknown) => import("./errors/index.js").NetworkAuthenticationRequiredError; }; byStatus: (status: number, detail: unknown) => import("./core/http-error.js").HttpError; }; //# sourceMappingURL=errors.d.ts.map