Skip to content

Commit

Permalink
return BAD_REQUEST if InvalidResponseFintEventException is thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
hknots committed Jan 13, 2025
1 parent 4da07a1 commit 87210d7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
@ControllerAdvice
public class ExceptionController {

@ExceptionHandler(InvalidResponseFintEventException.class)
public ResponseEntity<String> handleInvalidResponseFintEventException(Throwable e) {
return ResponseEntity.badRequest().body(e.getMessage());
}

@ExceptionHandler(AdapterNotRegisteredException.class)
public ResponseEntity<String> handleAdapterNotRegisteredException(Throwable e) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(e.getMessage());
Expand Down

0 comments on commit 87210d7

Please sign in to comment.