@nahkies/typescript-express-runtime
Version:
Runtime package for code generated by @nahkies/openapi-code-generator using the typescript-express template
15 lines (14 loc) • 635 B
TypeScript
export declare enum RequestInputType {
RouteParam = "route params",
QueryString = "querystring",
RequestBody = "request body",
RequestHeader = "request header"
}
export declare class ExpressRuntimeError extends Error {
readonly phase: "request_validation" | "request_handler" | "response_validation";
private constructor();
static RequestError(cause: unknown, inputType: RequestInputType): ExpressRuntimeError;
static HandlerError(cause: unknown): ExpressRuntimeError;
static ResponseError(cause: unknown): ExpressRuntimeError;
static isExpressError(err: unknown): err is ExpressRuntimeError;
}