Fix error handling to display them correctly without crashing

This commit is contained in:
2020-06-17 18:48:33 +02:00
parent e1c7363d7b
commit eb2be6b94e
7 changed files with 60 additions and 28 deletions

View 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;