Skip to content
Snippets Groups Projects
Commit 93e5d364 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6858 log with exception id

parent bb98f9e3
Branches
Tags
No related merge requests found
...@@ -104,11 +104,11 @@ public class ExceptionHandler { ...@@ -104,11 +104,11 @@ public class ExceptionHandler {
@GrpcExceptionHandler @GrpcExceptionHandler
public StatusException handleNotFoundException(de.ozgcloud.apilib.common.errorhandling.NotFoundException e) { public StatusException handleNotFoundException(de.ozgcloud.apilib.common.errorhandling.NotFoundException e) {
LOG.error(ERROR_MESSAGE, e);
var exceptionId = createExceptionId(); var exceptionId = createExceptionId();
var messageWithExceptionId = ExceptionUtil.formatMessageWithExceptionId(e.getMessage(), exceptionId); var messageWithExceptionId = ExceptionUtil.formatMessageWithExceptionId(e.getMessage(), exceptionId);
var status = Status.NOT_FOUND.withDescription(messageWithExceptionId).withCause(e.getCause()); LOG.error("Grpc internal server error: {}", messageWithExceptionId, e);
var status = Status.NOT_FOUND.withDescription(messageWithExceptionId).withCause(e.getCause());
return createStatusException(status, buildMetadata(exceptionId)); return createStatusException(status, buildMetadata(exceptionId));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment