From c3e9d39034e5afc3f2c3a12c8c7682eabe360b7d Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Fri, 29 May 2026 22:35:18 +1000 Subject: Modified controller endpoints to throw exceptions instead of returning HTTP responses on error --- Services/MediaService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Services') diff --git a/Services/MediaService.cs b/Services/MediaService.cs index e497570..2d1533c 100644 --- a/Services/MediaService.cs +++ b/Services/MediaService.cs @@ -304,7 +304,7 @@ public class MediaService : IMediaService { return System.IO.File.OpenRead(thumbPath); if(!File.Exists(GetPath(mediaId))) - throw new ObjectNotFoundException(mediaId); + throw new ObjectNotFoundException([ mediaId ]); using var image = new MagickImage(GetPath(mediaId)); @@ -329,7 +329,7 @@ public class MediaService : IMediaService { return System.IO.File.OpenRead(convertedPath); if(!File.Exists(GetPath(mediaId))) - throw new ObjectNotFoundException(mediaId); + throw new ObjectNotFoundException([ mediaId ]); using var image = new MagickImage(GetPath(mediaId)); image.Write(convertedPath, format); -- cgit v1.3