Adds album hash not found error handling
This commit is contained in:
parent
0c7805eee3
commit
bb0cac8553
@ -13,6 +13,13 @@ class GlobalExceptionHandler {
|
|||||||
ErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR.value(),
|
ErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR.value(),
|
||||||
e.message ?:""), HttpStatus.INTERNAL_SERVER_ERROR)
|
e.message ?:""), HttpStatus.INTERNAL_SERVER_ERROR)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ExceptionHandler
|
||||||
|
fun handleAlbumHashNotFoundException(e: AlbumHashNotFoundException): ResponseEntity<ErrorResponse> {
|
||||||
|
return ResponseEntity(
|
||||||
|
ErrorResponse(HttpStatus.BAD_REQUEST.value(),
|
||||||
|
e.message ?:""), HttpStatus.BAD_REQUEST)
|
||||||
|
}
|
||||||
@ExceptionHandler
|
@ExceptionHandler
|
||||||
fun handleException(e: RuntimeException): ResponseEntity<ErrorResponse> {
|
fun handleException(e: RuntimeException): ResponseEntity<ErrorResponse> {
|
||||||
return ResponseEntity(
|
return ResponseEntity(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user