From d7d7b7d2e3ec71ad01d1629e21e575bb4035dc95 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Tue, 14 May 2024 20:09:14 +0200 Subject: [PATCH] [backend/drive] Improve error handling during DriveService.StoreFile --- Iceshrimp.Backend/Core/Services/DriveService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Iceshrimp.Backend/Core/Services/DriveService.cs b/Iceshrimp.Backend/Core/Services/DriveService.cs index 8ccd0444..f8155de2 100644 --- a/Iceshrimp.Backend/Core/Services/DriveService.cs +++ b/Iceshrimp.Backend/Core/Services/DriveService.cs @@ -195,6 +195,7 @@ public class DriveService( catch (Exception e) { logger.LogDebug("Failed to generate/write thumbnail: {e}", e.Message); + thumbnailFilename = null; } } @@ -210,6 +211,7 @@ public class DriveService( catch (Exception e) { logger.LogDebug("Failed to generate/write webp: {e}", e.Message); + webpublicFilename = null; } } } @@ -232,6 +234,7 @@ public class DriveService( catch (Exception e) { logger.LogDebug("Failed to generate/write thumbnail: {e}", e.Message); + thumbnailFilename = null; } } @@ -247,7 +250,8 @@ public class DriveService( } catch (Exception e) { - logger.LogDebug("Failed to generate/write thumbnail: {e}", e.Message); + logger.LogDebug("Failed to generate/write webp: {e}", e.Message); + webpublicFilename = null; } } }