Skip to content

Commit

Permalink
chore(pagarme): Better debugging create transaction with error responses
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Sep 25, 2024
1 parent c3ae522 commit f31b423
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/apps/pagarme/src/pagarme-create-transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,11 @@ export default async (modBody: AppModuleBody<'create_transaction'>) => {
} else {
err.response = data;
}
logger.warn('Failed creating Pagar.me transaction', {
pagarmeTransaction,
status,
response: data,
});
} else if (data && Array.isArray(data.errors) && data.errors[0] && data.errors[0].message) {
message = data.errors[0].message;
}
Expand Down

0 comments on commit f31b423

Please sign in to comment.