refactor: add devMessage field (useful in front-end)
This commit is contained in:
parent
aefbc965ab
commit
ba65c1fe83
3 changed files with 14 additions and 1 deletions
|
|
@ -6,13 +6,15 @@ class HttpError extends Error {
|
|||
*/
|
||||
status: HttpStatus;
|
||||
message: string;
|
||||
devMessage?: string;
|
||||
|
||||
constructor(status: HttpStatus, message: string) {
|
||||
constructor(status: HttpStatus, message: string, devMessage?: string) {
|
||||
super(message);
|
||||
|
||||
this.name = "HttpError";
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
this.devMessage = devMessage;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue