From ba91d0d433aa1180c04f941a82b9af0259284801 Mon Sep 17 00:00:00 2001 From: philipliu Date: Fri, 16 Feb 2024 13:32:54 -0500 Subject: [PATCH] Lower request validation error log level --- .../controller/GlobalControllerExceptionHandler.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/src/main/java/org/stellar/anchor/platform/controller/GlobalControllerExceptionHandler.java b/platform/src/main/java/org/stellar/anchor/platform/controller/GlobalControllerExceptionHandler.java index a16cd3403b..e2df53b00c 100644 --- a/platform/src/main/java/org/stellar/anchor/platform/controller/GlobalControllerExceptionHandler.java +++ b/platform/src/main/java/org/stellar/anchor/platform/controller/GlobalControllerExceptionHandler.java @@ -1,6 +1,6 @@ package org.stellar.anchor.platform.controller; -import static org.stellar.anchor.util.Log.errorEx; +import static org.stellar.anchor.util.Log.*; import javax.transaction.NotSupportedException; import org.springframework.http.HttpStatus; @@ -18,14 +18,14 @@ public class GlobalControllerExceptionHandler { @ResponseStatus(HttpStatus.BAD_REQUEST) @ExceptionHandler({SepValidationException.class, BadRequestException.class}) public SepExceptionResponse handleBadRequest(AnchorException ex) { - errorEx(ex); + info(ex.getMessage()); return new SepExceptionResponse(ex.getMessage()); } @ResponseStatus(HttpStatus.BAD_REQUEST) @ExceptionHandler(MissingServletRequestParameterException.class) public SepExceptionResponse handleMissingParams(MissingServletRequestParameterException ex) { - errorEx(ex); + info(ex.getMessage()); String name = ex.getParameterName(); return new SepExceptionResponse(String.format("The \"%s\" parameter is missing.", name)); } @@ -41,6 +41,7 @@ public SepExceptionResponse handleRandomException(HttpMessageNotReadableExceptio @ExceptionHandler({SepNotAuthorizedException.class}) public SepExceptionResponse handleAuthError(SepException ex) { errorEx(ex); + return new SepExceptionResponse(ex.getMessage()); }