Changes on messages
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using MassTransit;
|
||||
using MassTransit;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MimeMapping;
|
||||
using Musify.Application.Contracts.Infrastructure;
|
||||
@@ -46,7 +46,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Files
|
||||
if (!uploadResult.IsSuccess)
|
||||
{
|
||||
var errors = string.Join("; ", uploadResult.Errors);
|
||||
logger.LogWarning("Failed to upload file to bucket. Bucket={Bucket}, Key={Key}, Errors={Errors}",
|
||||
logger.LogWarning("Failed to upload file to bucket {Bucket}/{Route}: {Errors}",
|
||||
executeContext.Arguments.DestinationBucket,
|
||||
executeContext.Arguments.DestinationRoute,
|
||||
errors);
|
||||
@@ -60,7 +60,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Files
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
logger.LogError(exception, "An error occurred while uploading file to bucket for process={ProcessId} at step={StepId}", processId, stepId);
|
||||
logger.LogError(exception, "Failed to upload file to bucket for process {ProcessId} step {StepId}", processId, stepId);
|
||||
await processTrackingStore.FailStepAsync(processId, stepId, exception.Message, executeContext.CancellationToken);
|
||||
throw;
|
||||
}
|
||||
@@ -78,7 +78,8 @@ namespace Musify.Infrastructure.MassTransit.Activities.Files
|
||||
if (!uploadResult.IsSuccess)
|
||||
{
|
||||
var errors = string.Join("; ", uploadResult.Errors);
|
||||
logger.LogError($"Failed to remove file from bucket during compensation. Bucket={compensateContext.Log.DestinationBucket}, Key={compensateContext.Log.DestinationKey}, Errors={errors}");
|
||||
logger.LogError("Failed to remove file from bucket during compensation. Bucket: {Bucket}, Key: {Key}, Errors: {Errors}",
|
||||
compensateContext.Log.DestinationBucket, compensateContext.Log.DestinationKey, errors);
|
||||
|
||||
return compensateContext.Failed(new Exception($"Failed to remove file from bucket during compensation. Bucket: {compensateContext.Log.DestinationBucket}, Key: {compensateContext.Log.DestinationKey}, Errors: {errors}"));
|
||||
}
|
||||
@@ -86,7 +87,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Files
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
logger.LogError(exception, "An error occurred while compensating upload file to bucket activity for bucket={Bucket} and key={Key}",
|
||||
logger.LogError(exception, "Error compensating file upload for {Bucket}/{Key}",
|
||||
compensateContext.Log.DestinationBucket,
|
||||
compensateContext.Log.DestinationKey);
|
||||
return compensateContext.Failed(exception);
|
||||
|
||||
Reference in New Issue
Block a user