mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-31 10:08:03 +03:00
Initial commit
This commit is contained in:
17
src/utils/httpError.ts
Normal file
17
src/utils/httpError.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export default class HttpError extends Error {
|
||||
public code: number;
|
||||
|
||||
public errorMessage: string |null;
|
||||
|
||||
public statusText: string;
|
||||
|
||||
public type: string;
|
||||
|
||||
constructor(code:number, message:string|null, type: string, statusText:string) {
|
||||
super(message || '');
|
||||
this.errorMessage = message;
|
||||
this.type = type;
|
||||
this.statusText = statusText;
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user