Skip to content

Commit

Permalink
[Fix] Reduce log level for client errors (#1277)
Browse files Browse the repository at this point in the history
### Description

This reduces the log levels for client-sided errors.

### Context

These are client-sided errors. They should be set to `info` as some
partners are alerting on `error`.

### Testing

- `./gradlew test`

### Documentation

N/A

### Known limitations

N/A
  • Loading branch information
philipliu authored Mar 1, 2024
1 parent b62a878 commit 3488850
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ subprojects {

allprojects {
group = "org.stellar.anchor-sdk"
version = "1.2.23"
version = "1.2.24"

tasks.jar {
manifest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,28 @@ public SepExceptionResponse handleMissingParams(MissingServletRequestParameterEx
@ExceptionHandler(HttpMessageNotReadableException.class)
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
public SepExceptionResponse handleRandomException(HttpMessageNotReadableException ex) {
errorEx(ex);
info(ex.getMessage());
return new SepExceptionResponse("Your request body is wrong in some way.");
}

@ResponseStatus(HttpStatus.FORBIDDEN)
@ExceptionHandler({SepNotAuthorizedException.class})
public SepExceptionResponse handleAuthError(SepException ex) {
errorEx(ex);

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

@ExceptionHandler({SepNotFoundException.class, NotFoundException.class})
@ResponseStatus(value = HttpStatus.NOT_FOUND)
SepExceptionResponse handleNotFound(AnchorException ex) {
errorEx(ex);
info(ex.getMessage());
return new SepExceptionResponse(ex.getMessage());
}

@ResponseStatus(HttpStatus.NOT_IMPLEMENTED)
@ExceptionHandler({NotSupportedException.class})
public SepExceptionResponse handleNotImplementedError(Exception ex) {
errorEx(ex);
info(ex.getMessage());
return new SepExceptionResponse(ex.getMessage());
}

Expand Down

0 comments on commit 3488850

Please sign in to comment.