Skip to content

Commit

Permalink
Added more information to EventStoreDBSubscriptionToAll warning when …
Browse files Browse the repository at this point in the history
…cannot deserialize
  • Loading branch information
oskardudycz committed May 16, 2024
1 parent 3b5be3c commit 5b02593
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ CancellationToken token
// then we might get events that are from other module and we might not be able to deserialize them.
// In that case it's safe to ignore deserialization error.
// You may add more sophisticated logic checking if it should be ignored or not.
logger.LogWarning("Couldn't deserialize event with id: {EventId}", resolvedEvent.Event.EventId);
logger.LogWarning("Couldn't deserialize event with {EventType} and id: {EventId}",
resolvedEvent.Event.EventType, resolvedEvent.Event.EventId);

if (!subscriptionOptions.IgnoreDeserializationErrors)
throw new InvalidOperationException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public class EntityFrameworkProjectionBuilder<TView, TDbContext>(IServiceCollect
where TView : class
where TDbContext : DbContext
{
public readonly IServiceCollection services = services;

public EntityFrameworkProjectionBuilder<TView, TDbContext> AddOn<TEvent>(Func<EventEnvelope<TEvent>, TView> handler) where TEvent : notnull
{
services.AddSingleton(handler);
Expand Down

0 comments on commit 5b02593

Please sign in to comment.