Skip to content

Commit

Permalink
fix(mercadopago): Debug transaction error response even on 401/403
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Feb 7, 2025
1 parent 7d31485 commit 18134e2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/apps/mercadopago/src/mp-create-transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@ export default async (appData: AppModuleBody) => {
if (status !== 401 && status !== 403) {
err.payment = JSON.stringify(payment);
err.status = status;
if (typeof data === 'object' && data) {
err.response = JSON.stringify(data);
} else {
err.response = data;
}
if (typeof data.message === 'string' && data.message) {
message = data.message;
}
}
if (typeof data === 'object' && data) {
err.response = JSON.stringify(data);
} else {
err.response = data;
}
}
logger.error(err);
return {
Expand Down

0 comments on commit 18134e2

Please sign in to comment.