Skip to content

Commit

Permalink
feat(errorResponse): Handle response errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Dam998 committed Sep 16, 2024
1 parent c148bd2 commit 3cb2076
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/LogFlake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ export class LogFlake {
try {
const response = await fetch(`${this.server}/api/ingestion/${this.appId}/${queue}`, fetchOptions)
if (!response.ok) {
const textResponse = await response.text()
console.error(`LogFlake Error: ${response.status} ${response.statusText}`)
console.error(`LogFlake Error Text: ${textResponse}`)
console.error(`LogFlake Error Body object: ${bodyObject}`)
continue
}

Expand Down

0 comments on commit 3cb2076

Please sign in to comment.