Skip to content
Snippets Groups Projects
Commit 96f58876 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6944 change log level of NotFoundException

parent 5bf3dcf1
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ public class ExceptionHandler { ...@@ -49,7 +49,7 @@ public class ExceptionHandler {
@GrpcExceptionHandler @GrpcExceptionHandler
public StatusException handleNotFoundException(NotFoundException e) { public StatusException handleNotFoundException(NotFoundException e) {
LOG.error(ERROR_MESSAGE, e); LOG.warn(ERROR_MESSAGE, e);
return createStatusException(buildNotFoundStatus(e), buildMetadata(e)); return createStatusException(buildNotFoundStatus(e), buildMetadata(e));
} }
...@@ -112,7 +112,7 @@ public class ExceptionHandler { ...@@ -112,7 +112,7 @@ public class ExceptionHandler {
public StatusException handleNotFoundException(de.ozgcloud.apilib.common.errorhandling.NotFoundException e) { public StatusException handleNotFoundException(de.ozgcloud.apilib.common.errorhandling.NotFoundException e) {
var exceptionId = createExceptionId(); var exceptionId = createExceptionId();
var messageWithExceptionId = ExceptionUtil.formatMessageWithExceptionId(e.getMessage(), exceptionId); var messageWithExceptionId = ExceptionUtil.formatMessageWithExceptionId(e.getMessage(), exceptionId);
LOG.error("Grpc internal server error: {}", messageWithExceptionId, e); LOG.warn("Grpc internal server error: {}", messageWithExceptionId, e);
var status = Status.NOT_FOUND.withDescription(messageWithExceptionId).withCause(e.getCause()); 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