fix error naming
This commit is contained in:
parent
063e7f00b6
commit
9cef571576
4
utils.js
4
utils.js
@ -33,7 +33,7 @@ export async function requestTicket (username, password) {
|
|||||||
return response;
|
return response;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error instanceof AuthenticationError) {
|
if (error instanceof ResponseError) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
throw new NetworkError(error);
|
throw new NetworkError(error);
|
||||||
@ -73,7 +73,7 @@ export async function request (path, method, body) {
|
|||||||
return response;
|
return response;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error instanceof AuthenticationError) {
|
if (error instanceof ResponseError) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
throw new NetworkError(error);
|
throw new NetworkError(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user