Skip to content

Commit

Permalink
MID-7578 improved error handling in REST responses - now operation re…
Browse files Browse the repository at this point in the history
…sult sent via exception contains exception with some message.
  • Loading branch information
1azyman committed Jan 18, 2022
1 parent b5ebc52 commit 15db665
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ protected ResponseEntity<?> handleException(OperationResult result, Throwable t)
}

protected ResponseEntity<?> handleExceptionNoLog(OperationResult result, Throwable t) {
if (result.isEmpty()) {
result.recordFatalError("Unknown exception occurred", t);
} else {
result.computeStatus();
}

return createErrorResponseBuilder(result, t);
}

Expand Down

0 comments on commit 15db665

Please sign in to comment.