Skip to content

Commit

Permalink
Reduces the verbosity of the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
CesarCoelho committed Oct 20, 2023
1 parent 50e38e5 commit fe0d1a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mal-impl/src/main/java/esa/mo/mal/impl/MALReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public void onMessage(final MALEndpoint callingEndpoint, MALMessage msg) {
}
} catch (MALInteractionException ex) {
// try to determine address info if null
if (null == address) {
if (address == null) {
address = lookupAddress(callingEndpoint, msg);
}

Expand Down
7 changes: 4 additions & 3 deletions mal-impl/src/main/java/esa/mo/mal/impl/MALSender.java
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,12 @@ private MALMessageBody initiateSynchronousInteraction(final Long transId,
throw new MALException("Return message was null!");
}

// handle possible return error
// Case when we receive an Error message back on the return message:
if (rtn.getHeader().getIsErrorMessage()) {
if (rtn.getBody() instanceof MALErrorBody) {
MOErrorException error = ((MALErrorBody) rtn.getBody()).getError();
MALContextFactoryImpl.LOGGER.log(Level.SEVERE,
MALErrorBody errorBody = (MALErrorBody) rtn.getBody();
MOErrorException error = errorBody.getError();
MALContextFactoryImpl.LOGGER.log(Level.FINE,
"Something went wrong!", error);
throw new MALInteractionException(error);
}
Expand Down

0 comments on commit fe0d1a9

Please sign in to comment.