Fix error handling to display them correctly without crashing
This commit is contained in:
12
backend/src/models/RequestError.ts
Normal file
12
backend/src/models/RequestError.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// @ts-ignore
|
||||
interface RequestError extends Error {
|
||||
response?: any;
|
||||
}
|
||||
|
||||
interface RequestErrorConstructor extends ErrorConstructor {
|
||||
new(message?: string): RequestError;
|
||||
(message?: string): RequestError;
|
||||
readonly prototype: RequestError;
|
||||
}
|
||||
|
||||
declare var RequestError: RequestErrorConstructor;
|
||||
Reference in New Issue
Block a user