Skip to content

Commit

Permalink
moved the map to ExceptionMappers class
Browse files Browse the repository at this point in the history
  • Loading branch information
lkonno committed Nov 21, 2023
1 parent b9f9e8a commit fec7b3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
5 changes: 5 additions & 0 deletions src/main/java/io/cryostat/ExceptionMappers.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,9 @@ public RestResponse<Void> mapScriptException(ScriptException ex) {
public RestResponse<Void> mapNoSuchKeyException(NoSuchKeyException ex) {
return RestResponse.status(HttpResponseStatus.NOT_FOUND.code());
}

@ServerExceptionMapper
public RestResponse<Void> mapIllegalArgumentException(IllegalArgumentException exception) {
return RestResponse.status(HttpResponseStatus.BAD_REQUEST.code());
}
}
28 changes: 0 additions & 28 deletions src/main/java/io/cryostat/util/IllegalArgumentExceptionMapper.java

This file was deleted.

0 comments on commit fec7b3e

Please sign in to comment.