Fix wrong catch block in artwork upload

This commit is contained in:
Alex Cabal 2024-12-26 17:09:05 -06:00
parent 2948f96518
commit 7df973bea2

View file

@ -135,7 +135,7 @@ catch(Exceptions\InvalidPermissionsException){
catch(Exceptions\ArtworkNotFoundException){
Template::ExitWithCode(Enums\HttpCode::NotFound);
}
catch(Exceptions\InvalidArtworkException | Exceptions\InvalidArtworkTagException | Exceptions\InvalidArtistException | Exceptions\InvalidFileUploadException $ex){
catch(Exceptions\InvalidArtworkException | Exceptions\InvalidArtworkTagException | Exceptions\InvalidArtistException | Exceptions\InvalidImageUploadException | Exceptions\InvalidFileUploadException $ex){
// If we were passed a more generic file upload exception from `HttpInput`, swap it for a more specific exception to show to the user.
if($ex instanceof Exceptions\InvalidFileUploadException){
$ex = new Exceptions\InvalidImageUploadException();