diff --git a/src/main/kotlin/net/halfbinary/prettyplayerapi/exception/GlobalExceptionHandler.kt b/src/main/kotlin/net/halfbinary/prettyplayerapi/exception/GlobalExceptionHandler.kt index 7420245..fa3499b 100644 --- a/src/main/kotlin/net/halfbinary/prettyplayerapi/exception/GlobalExceptionHandler.kt +++ b/src/main/kotlin/net/halfbinary/prettyplayerapi/exception/GlobalExceptionHandler.kt @@ -20,6 +20,13 @@ class GlobalExceptionHandler { ErrorResponse(HttpStatus.BAD_REQUEST.value(), e.message ?:""), HttpStatus.BAD_REQUEST) } + + @ExceptionHandler + fun handleAlbumFolderNotFoundException(e: AlbumFolderNotFoundException): ResponseEntity { + return ResponseEntity( + ErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR.value(), + e.message ?:""), HttpStatus.INTERNAL_SERVER_ERROR) + } @ExceptionHandler fun handleException(e: RuntimeException): ResponseEntity { return ResponseEntity(