mirror of
https://github.com/Spythere/srjp-td2.git
synced 2026-05-03 05:28:12 +00:00
chore(http): added error throw on bad response
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ export class HttpClient {
|
||||
const data = await fetch(absoluteURL);
|
||||
|
||||
if (!data.ok) {
|
||||
throw new Error(`Cannot fetch: ${absoluteURL}`);
|
||||
throw new Error(`Cannaot fetch: ${absoluteURL}`);
|
||||
}
|
||||
|
||||
return data.json();
|
||||
|
||||
Reference in New Issue
Block a user