diff --git a/src/InformaticsGateway/Logging/Log.700.PayloadService.cs b/src/InformaticsGateway/Logging/Log.700.PayloadService.cs index 06f781890..a44b2e4a2 100644 --- a/src/InformaticsGateway/Logging/Log.700.PayloadService.cs +++ b/src/InformaticsGateway/Logging/Log.700.PayloadService.cs @@ -133,5 +133,8 @@ public static partial class Log [LoggerMessage(EventId = 742, Level = LogLevel.Critical, Message = "Storage service connection error.")] public static partial void StorageServiceConnectionError(this ILogger logger, Exception ex); + + [LoggerMessage(EventId = 743, Level = LogLevel.Error, Message = "Exception moving payload.")] + public static partial void PayloadMoveException(this ILogger logger, Exception ex); } } diff --git a/src/InformaticsGateway/Services/Connectors/PayloadMoveActionHandler.cs b/src/InformaticsGateway/Services/Connectors/PayloadMoveActionHandler.cs index ab1936ca4..59f10c332 100644 --- a/src/InformaticsGateway/Services/Connectors/PayloadMoveActionHandler.cs +++ b/src/InformaticsGateway/Services/Connectors/PayloadMoveActionHandler.cs @@ -198,6 +198,7 @@ await _storageService.CopyObjectAsync( } catch (Exception ex) { + _logger.PayloadMoveException(ex); await LogFilesInMinIo(file.TemporaryBucketName, cancellationToken).ConfigureAwait(false); throw new FileMoveException(file.GetTempStoragPath(_options.Value.Storage.RemoteTemporaryStoragePath), file.UploadPath, ex); }