Skip to content

Commit

Permalink
Print errors on JSON parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie committed May 8, 2024
1 parent ddb6406 commit f721c37
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utils/feedbin.ts
Expand Up @@ -15,7 +15,13 @@ async function feedbin<APIResponse>(endpoint: string): Promise<APIResponse> {
const response = await fetch(url, {
headers: {Authorization: `Basic ${FEEDBIN_API_KEY}`},
})
return response.json()
try {
return await response.json()
} catch (e) {
console.log(e)
console.log(await response.text())
throw e
}
}

/** Represents a starred entry in Feedbin */
Expand Down

0 comments on commit f721c37

Please sign in to comment.