http-errors-plus
Version:
Next-gen HTTP error handling for modern JavaScript and TypeScript apps — structured, overrideable, and developer-focused.
12 lines (11 loc) • 401 B
TypeScript
/**
* @param {{ status: number, code: string, message: string }} base
* @param {Partial<import('./http-error.js').SerializedHttpError>} [override]
* @returns {HttpError}
*/
export function generateError(base: {
status: number;
code: string;
message: string;
}, override?: Partial<import("./http-error.js").SerializedHttpError>): HttpError;
import { HttpError } from './http-error.js';