initial commit
This commit is contained in:
commit
c5e3107e03
26 changed files with 3828 additions and 0 deletions
19
src/interfaces/http-error.ts
Normal file
19
src/interfaces/http-error.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import HttpStatus from "./http-status";
|
||||
|
||||
class HttpError extends Error {
|
||||
/**
|
||||
* HTTP Status Code
|
||||
*/
|
||||
status: HttpStatus;
|
||||
message: string;
|
||||
|
||||
constructor(status: HttpStatus, message: string) {
|
||||
super(message);
|
||||
|
||||
this.name = "HttpError";
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
export default HttpError;
|
||||
Loading…
Add table
Add a link
Reference in a new issue