chore(http): added error throw on bad response

This commit is contained in:
2026-04-04 23:41:47 +02:00
parent 345c5764f9
commit eb3c42de8f
+1 -1
View File
@@ -15,7 +15,7 @@ export class HttpClient {
const data = await fetch(absoluteURL); const data = await fetch(absoluteURL);
if (!data.ok) { if (!data.ok) {
throw new Error(`Cannot fetch: ${absoluteURL}`); throw new Error(`Cannaot fetch: ${absoluteURL}`);
} }
return data.json(); return data.json();