UNPKG

rfc9457

Version:

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

15 lines 560 B
import { HttpError } from "../../core/index.js"; import { extractCause, getErrorType, normalizeToString, } from "../../helpers/index.js"; export class MethodNotAllowedError extends HttpError { constructor(detail) { super({ type: getErrorType("method-not-allowed"), title: "Method Not Allowed", status: 405, detail: normalizeToString(detail), cause: extractCause(detail), }); this.name = "MethodNotAllowedError"; } } //# sourceMappingURL=method-not-allowed-error.js.map