diff --git a/AppImageGenerator.csproj b/AppImageGenerator.csproj
index bcde42a..b6e3772 100644
--- a/AppImageGenerator.csproj
+++ b/AppImageGenerator.csproj
@@ -10,15 +10,15 @@
-
-
-
-
+
+
+
+
-
+
-
-
+
+
diff --git a/Controllers/ImageController.cs b/Controllers/ImageController.cs
index fd66fc0..f935bda 100644
--- a/Controllers/ImageController.cs
+++ b/Controllers/ImageController.cs
@@ -62,8 +62,16 @@ public async Task Get(string id)
}
catch (Exception ex)
{
- _logger.LogError(ex, string.Format("{{GetZipById}}: Couldn't get generated zip due to exception", GetZipById));
- return StatusCode((int)HttpStatusCode.InternalServerError, ex.ToString());
+ if (ex.Message.StartsWith("Could not find file"))
+ {
+ _logger.LogError(ex, string.Format("{{GetZipById}}: Couldn't find file", GetZipById));
+ return StatusCode((int)HttpStatusCode.NotFound, ex.ToString());
+ }
+ else {
+ _logger.LogError(ex, string.Format("{{GetZipById}}: Couldn't get generated zip due to exception", GetZipById));
+ return StatusCode((int)HttpStatusCode.InternalServerError, ex.ToString());
+ }
+
}
}
diff --git a/Models/ImageGenerationModel.cs b/Models/ImageGenerationModel.cs
index b15b1dd..4b7f4e8 100644
--- a/Models/ImageGenerationModel.cs
+++ b/Models/ImageGenerationModel.cs
@@ -1,8 +1,6 @@
using System.Globalization;
-using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats;
-using SixLabors.ImageSharp.Processing;
using SkiaSharp;
using SKSvg = Svg.Skia.SKSvg;