/** 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; } }