Skip to content

Commit

Permalink
better error messages for request in CachedAssetsManager
Browse files Browse the repository at this point in the history
  • Loading branch information
yuko1101 committed Dec 30, 2024
1 parent 02b4b7b commit 0159bfc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/CachedAssetsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class CachedAssetsManager {

const res = await fetchJSON(url, this.enka);
if (res.status !== 200) {
throw new Error("Request Failed");
throw new Error(`Request Failed: ${res.status} - ${res.statusText}`);
}

const data = res.data;
Expand Down Expand Up @@ -328,7 +328,7 @@ export class CachedAssetsManager {

const res = await fetchJSON(url, this.enka);
if (res.status !== 200) {
throw new Error("Request Failed");
throw new Error(`Request Failed: ${res.status} - ${res.statusText}`);
}

const data = res.data;
Expand Down

0 comments on commit 0159bfc

Please sign in to comment.