generated from ztimson/template
init
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
/** 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user