Files
2026-10-21 19:32:02 -04:00

11 lines
323 B
JavaScript

/** Error intended to be returned by the HTTP API. */
export class ServiceError extends Error {
constructor(code, message, status = 500, details = undefined) {
super(message);
this.name = 'ServiceError';
this.code = code;
this.status = status;
if (details !== undefined) this.details = details;
}
}