Skip to content

Commit

Permalink
fix(webhook ecom): Update debug errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wisley7l committed Nov 24, 2023
1 parent e490f19 commit 2f2e7d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion functions/lib/galaxpay/update-subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,12 @@ const getSubscriptionsByListMyIds = async (
}, [])
return galaxPaySubscriptions
} catch (err) {
console.error(err)
if (err.response) {
const { status, data } = err.response
console.log('Error: ', status, ' ', data && JSON.stringify(data))
} else {
console.error(err)
}
return null
}
}
Expand Down
2 changes: 1 addition & 1 deletion functions/routes/ecom/webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ exports.post = async ({ appSdk, admin }, req, res) => {
} catch (err) {
console.error(`Error trying to update signature #${subscription.myId}`)
if (err.response) {
const { status, data } = error.response
const { status, data } = err.response
console.log('Error: ', status, ' ', data && JSON.stringify(data))
}
error = err
Expand Down

0 comments on commit 2f2e7d8

Please sign in to comment.