@lucid-softworks/http-errors
v0.1.0
Published
Structured HTTP errors and RFC 9457 problem responses.
Maintainers
Readme
@lucid-softworks/http-errors
Structured HTTP exceptions and RFC 9457-style problem responses.
import { HttpError, httpErrorResponse } from "@lucid-softworks/http-errors";
const response = httpErrorResponse(new HttpError(404, "User not found"));Client errors expose their message by default. Server errors hide it unless
expose: true is explicit. Custom headers, problem types, titles, and causes
are preserved.
