Skip to content

Commit

Permalink
fix(common): set correct description from CallError
Browse files Browse the repository at this point in the history
  • Loading branch information
thetric committed Feb 27, 2020
1 parent 0ab3bba commit 2c04aee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ocpp-common/src/main/java/eu/chargetime/ocpp/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public void handleError(
if (promiseOptional.isPresent()) {
promiseOptional
.get()
.completeExceptionally(new CallErrorException(errorCode, errorCode, payload));
.completeExceptionally(
new CallErrorException(errorCode, errorDescription, payload));
promiseRepository.removePromise(uniqueId);
} else {
logger.debug("Promise not found for error {}", errorDescription);
Expand Down
2 changes: 1 addition & 1 deletion ocpp-common/src/main/java/eu/chargetime/ocpp/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void handleError(
promiseOptional
.get()
.completeExceptionally(
new CallErrorException(errorCode, errorCode, payload));
new CallErrorException(errorCode, errorDescription, payload));
promiseRepository.removePromise(uniqueId);
} else {
logger.debug("Promise not found for error {}", errorDescription);
Expand Down

0 comments on commit 2c04aee

Please sign in to comment.