Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikus1993 committed Feb 21, 2024
1 parent 1de6bc6 commit 1426e34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
if (!result.IsSuccess)
{
logger.LogCantProcessMessage(result.ErrorValue, info.Exchange, info.RoutingKey, info.Queue);
activity?.RecordException(result.ErrorValue);
return _subscriptionConfiguration.AckStrategy;
}

Expand Down
4 changes: 3 additions & 1 deletion src/Modules/Catalog/Core/Repository/IProductWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ namespace Catalog.Core.Repository;
public sealed partial class AddProductResult : OneOfBase<Unit, Exception>
{
public bool IsSuccess => IsT0;

private static readonly AddProductResult OkValue = new AddProductResult(Unit.Value);

public static AddProductResult Ok() => new AddProductResult(Unit.Value);
public static AddProductResult Ok() => OkValue;
public static AddProductResult Error(Exception exception) => new AddProductResult(exception);
}

Expand Down

0 comments on commit 1426e34

Please sign in to comment.