Skip to content

Commit 7c97f1e

Browse files
authored
Log payload move exception (#323)
Signed-off-by: Victor Chang <[email protected]>
1 parent 86cb04c commit 7c97f1e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/InformaticsGateway/Logging/Log.700.PayloadService.cs

+3
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,8 @@ public static partial class Log
133133

134134
[LoggerMessage(EventId = 742, Level = LogLevel.Critical, Message = "Storage service connection error.")]
135135
public static partial void StorageServiceConnectionError(this ILogger logger, Exception ex);
136+
137+
[LoggerMessage(EventId = 743, Level = LogLevel.Error, Message = "Exception moving payload.")]
138+
public static partial void PayloadMoveException(this ILogger logger, Exception ex);
136139
}
137140
}

src/InformaticsGateway/Services/Connectors/PayloadMoveActionHandler.cs

+1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ await _storageService.CopyObjectAsync(
198198
}
199199
catch (Exception ex)
200200
{
201+
_logger.PayloadMoveException(ex);
201202
await LogFilesInMinIo(file.TemporaryBucketName, cancellationToken).ConfigureAwait(false);
202203
throw new FileMoveException(file.GetTempStoragPath(_options.Value.Storage.RemoteTemporaryStoragePath), file.UploadPath, ex);
203204
}

0 commit comments

Comments
 (0)