Skip to content

Commit

Permalink
fix: better debugging failed requests on tiny webhook throw
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Sep 11, 2024
1 parent 2dc9c89 commit 6614081
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions functions/lib/pubsub/webhook-tiny.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ module.exports = async (
if (err?.isConfigError === true) {
return resolve(true)
}
if (err?.config?.url) {
const { method, url } = err.config
logger.warn(`${method} ${url} failed`, {
data: err.response?.data,
status: err.response?.status
})
}
throw err
}
}
Expand Down

0 comments on commit 6614081

Please sign in to comment.