Skip to content

Commit

Permalink
Lower request validation error log level
Browse files Browse the repository at this point in the history
  • Loading branch information
philipliu committed Feb 16, 2024
1 parent e13816a commit e9d5c05
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -18,14 +18,14 @@ public class GlobalControllerExceptionHandler {
@ResponseStatus(HttpStatus.BAD_REQUEST)
@ExceptionHandler({SepValidationException.class, BadRequestException.class})
public SepExceptionResponse handleBadRequest(AnchorException ex) {
errorEx(ex);
warnEx(ex);
return new SepExceptionResponse(ex.getMessage());
}

@ResponseStatus(HttpStatus.BAD_REQUEST)
@ExceptionHandler(MissingServletRequestParameterException.class)
public SepExceptionResponse handleMissingParams(MissingServletRequestParameterException ex) {
errorEx(ex);
warnEx(ex);
String name = ex.getParameterName();
return new SepExceptionResponse(String.format("The \"%s\" parameter is missing.", name));
}
Expand All @@ -41,6 +41,7 @@ public SepExceptionResponse handleRandomException(HttpMessageNotReadableExceptio
@ExceptionHandler({SepNotAuthorizedException.class})
public SepExceptionResponse handleAuthError(SepException ex) {
errorEx(ex);

return new SepExceptionResponse(ex.getMessage());
}

Expand Down

0 comments on commit e9d5c05

Please sign in to comment.