All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 50s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
382 B
TypeScript
14 lines
382 B
TypeScript
import type { APIErrorCode } from "../../shared/api.ts";
|
|
|
|
/** Thrown anywhere below a route; errorMiddleware turns it into a response. */
|
|
export class APIException extends Error {
|
|
readonly code: APIErrorCode;
|
|
readonly status: number;
|
|
|
|
constructor(code: APIErrorCode, status: number, message: string) {
|
|
super(message);
|
|
this.code = code;
|
|
this.status = status;
|
|
}
|
|
}
|