Änderungen am TAgebuch
This commit is contained in:
10
backend/exceptions/HttpError.js
Normal file
10
backend/exceptions/HttpError.js
Normal file
@@ -0,0 +1,10 @@
|
||||
class HttpError extends Error {
|
||||
constructor(message, statusCode) {
|
||||
super(message);
|
||||
this.name = this.constructor.name;
|
||||
this.statusCode = statusCode;
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
}
|
||||
|
||||
export default HttpError;
|
||||
Reference in New Issue
Block a user