fix error naming

This commit is contained in:
Arthur Lu 2022-12-12 16:09:57 -08:00
parent 063e7f00b6
commit 9cef571576

View File

@ -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);