Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/SnackFlow.Application/Behaviors/LoggingBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public async Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TRe
{
logger.LogError(ex, "Error while handling request: {RequestName} after {ElapsedMs}ms",
requestFullName, stopwatch.ElapsedMilliseconds);

throw;
}
finally
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public async Task<Result<UpdateCompanyCommandResponse>> Handle(UpdateCompanyComm
}
catch (Exception ex)
{
logger.LogError(ex, $"error in class: {nameof(UpdateCompanyCommandHandler)}");
logger.LogError(ex, "exception occurred: {exType} - {Message}", ex.GetType().Name, ex.Message);
await unitOfWork.RollbackTransactionAsync(cancellationToken);
throw;
}
Expand Down
2 changes: 1 addition & 1 deletion src/SnackFlow.Infrastructure/Services/EmailService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public async Task SendAsync(string to, string subject, string body, EEmailAddres
}
catch (Exception ex)
{
logger.LogError(ex, $"error in class: {nameof(EmailService)}");
logger.LogError(ex, "exception occurred: {exType} - {Message}", ex.GetType().Name, ex.Message);
throw;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ await result.Should()
x => x.Log(
LogLevel.Error,
It.IsAny<EventId>(),
It.IsAny<It.IsAnyType>(),
It.Is<It.IsAnyType>((v, t) => v.ToString()!.Contains(ErrorMessage.NotFound.Company)),
It.IsAny<Exception>(),
It.IsAny<Func<It.IsAnyType, Exception?, string>>()),
Times.Once);
Expand Down