Skip to content

Handle missing event type when loading events #9

@skleanthous

Description

@skleanthous

BullOak.Repositories.EventStore.Events.ToItemWithType() throws on:

            var serializedEvent = System.Text.Encoding.UTF8.GetString(resolvedEvent.Event.Data);

            Type type = ReadTypeFromMetadata(resolvedEvent);

            object @event;
            if (type.IsInterface) // <-- throws NRE

If the type information is not found, type is null. A specific exception has to be thrown: EventTypeCouldNotBeResolvedException

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions