HOOK-97: Using errorCode instead of errorMessage (#94)

This commit is contained in:
Inal Arsanukaev 2019-08-26 16:30:10 +03:00 committed by GitHub
parent 6c9019b358
commit 55bb63c39c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>hooker</artifactId>
<version>2.0.37-SNAPSHOT</version>
<version>2.0.38-SNAPSHOT</version>
<packaging>jar</packaging>
<name>hooker</name>

View File

@ -17,11 +17,7 @@ public class ErrorUtils {
Failure failure = operationFailure.getFailure();
PaymentError paymentError = new PaymentError();
paymentError.setCode(failure.getCode());
if (failure.isSetReason()) {
paymentError.setMessage(failure.getReason());
} else {
paymentError.setMessage("Unknown error");
}
paymentError.setMessage(failure.getCode());
if (failure.isSetSub()) {
SubFailure sub = failure.getSub();
paymentError.setSubError(getSubError(sub));