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