mirror of
https://github.com/valitydev/midgard.git
synced 2024-11-06 09:15:16 +00:00
Fix failure transaction error message (#74)
This commit is contained in:
parent
2ea7ff8f59
commit
7976fb8498
2
pom.xml
2
pom.xml
@ -12,7 +12,7 @@
|
||||
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<artifactId>midgard</artifactId>
|
||||
<version>1.6.1-SNAPSHOT</version>
|
||||
<version>1.6.2-SNAPSHOT</version>
|
||||
|
||||
<name>midgard</name>
|
||||
<description>Application for work with clearing data</description>
|
||||
|
@ -71,7 +71,8 @@ public class ClearingTransactionPackageHandler implements ClearingPackageHandler
|
||||
++transactionPackageCount);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
serviceFailureTransactionHandler.handleTransaction(info, th.getMessage());
|
||||
log.error("Cought error while processing transaction {}:", info, th);
|
||||
serviceFailureTransactionHandler.handleTransaction(info, th.toString());
|
||||
}
|
||||
}
|
||||
return transactions;
|
||||
|
@ -29,14 +29,15 @@ public class ServiceFailureTransactionHandler implements FailureTransactionHandl
|
||||
private void saveFailureTransaction(ClearingEventTransactionInfo info, String errorMessage) throws Exception {
|
||||
switch (info.getTransactionType()) {
|
||||
case PAYMENT:
|
||||
log.error("Error was caught while clearing processed {} transaction with invoice_id {} and payment id {}",
|
||||
info.getTransactionType(), info.getInvoiceId(), info.getPaymentId());
|
||||
log.error("Error was caught while clearing processed {} transaction with invoice_id {} and " +
|
||||
"payment id {}. Reason: \n{}", info.getTransactionType(), info.getInvoiceId(),
|
||||
info.getPaymentId(), errorMessage);
|
||||
transactionsDao.saveFailureTransaction(getFailureTransaction(info, errorMessage, PAYMENT));
|
||||
break;
|
||||
case REFUND:
|
||||
log.error("Error was caught while clearing processed {} transaction with invoice_id {}, payment id {} " +
|
||||
"and refund id {}", info.getTransactionType(), info.getInvoiceId(), info.getPaymentId(),
|
||||
info.getRefundId());
|
||||
"and refund id {}. Reason: \n{}", info.getTransactionType(), info.getInvoiceId(),
|
||||
info.getPaymentId(), info.getRefundId(), errorMessage);
|
||||
transactionsDao.saveFailureTransaction(getFailureTransaction(info, errorMessage, REFUND));
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user