From ba91d0d433aa1180c04f941a82b9af0259284801 Mon Sep 17 00:00:00 2001 From: philipliu Date: Fri, 16 Feb 2024 13:32:54 -0500 Subject: [PATCH 1/2] 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()); } From 3d2a00cafaa4f493805c0e056f498a40c1153e32 Mon Sep 17 00:00:00 2001 From: philipliu Date: Fri, 16 Feb 2024 15:04:15 -0500 Subject: [PATCH 2/2] Bump version --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index ed1d686c75..b769ba0aaf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -118,7 +118,7 @@ subprojects { allprojects { group = "org.stellar.anchor-sdk" - version = "1.2.22" + version = "1.2.23" tasks.jar { manifest {