rfc9457
Version:
RFC 9457 Problem Details for HTTP APIs - A standardized error handling package for Node.js
15 lines • 577 B
JavaScript
import { HttpError } from "../../core/index.js";
import { extractCause, getErrorType, normalizeToString, } from "../../helpers/index.js";
export class PreconditionRequiredError extends HttpError {
constructor(detail) {
super({
type: getErrorType("precondition-required"),
title: "Precondition Required",
status: 428,
detail: normalizeToString(detail),
cause: extractCause(detail),
});
this.name = "PreconditionRequiredError";
}
}
//# sourceMappingURL=precondition-required-error.js.map