summaryrefslogtreecommitdiff
path: root/Services
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2026-05-29 22:35:18 +1000
committerJake Mannens <jake@asger.xyz>2026-05-30 03:38:05 +1000
commitc3e9d39034e5afc3f2c3a12c8c7682eabe360b7d (patch)
tree73c5f43ec246f700a164ef700956b9d82b95f594 /Services
parentcfd9959de69f9ab52e846e8acd232dc30d20aa27 (diff)
Modified controller endpoints to throw exceptions instead of returning HTTP responses on error
Diffstat (limited to 'Services')
-rw-r--r--Services/MediaService.cs4
1 files changed, 2 insertions, 2 deletions
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);