Adds support for album folder not found exception handling
This commit is contained in:
parent
da8a8f94d2
commit
5cdcb1b7c5
@ -20,6 +20,13 @@ class GlobalExceptionHandler {
|
|||||||
ErrorResponse(HttpStatus.BAD_REQUEST.value(),
|
ErrorResponse(HttpStatus.BAD_REQUEST.value(),
|
||||||
e.message ?:""), HttpStatus.BAD_REQUEST)
|
e.message ?:""), HttpStatus.BAD_REQUEST)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ExceptionHandler
|
||||||
|
fun handleAlbumFolderNotFoundException(e: AlbumFolderNotFoundException): ResponseEntity<ErrorResponse> {
|
||||||
|
return ResponseEntity(
|
||||||
|
ErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR.value(),
|
||||||
|
e.message ?:""), HttpStatus.INTERNAL_SERVER_ERROR)
|
||||||
|
}
|
||||||
@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