Adds support for album folder not found exception handling

This commit is contained in:
aarbit 2024-06-07 22:52:37 -05:00
parent da8a8f94d2
commit 5cdcb1b7c5

View File

@ -20,6 +20,13 @@ class GlobalExceptionHandler {
ErrorResponse(HttpStatus.BAD_REQUEST.value(),
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
fun handleException(e: RuntimeException): ResponseEntity<ErrorResponse> {
return ResponseEntity(