Skip to content

Commit

Permalink
Update fetch logging
Browse files Browse the repository at this point in the history
  • Loading branch information
v-rogg committed Nov 22, 2023
1 parent e4fb110 commit 736da44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/connection/fetch.pulic.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
export async function get<T>(url: RequestInfo | URL, f = fetch): Promise<T> {
return f(url).then(async (res) => {
console.log(res.status, res.statusText);
if (res.status != 200) {
console.log(res.text());
}
return res.json()
});
}

0 comments on commit 736da44

Please sign in to comment.