MediatR - System.Text.Json.JsonException: 'S' is an invalid start of a value.
I have a project with Clean Architecture and MediatR.
My API gets the request fine and the command is created with correct data. In this case my tests passes Email = "[email protected]"
However, my Handler is never invoked. Directly after
I get the following error
System.Text.Json.JsonException
'S' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
Any pointers or ideas what the cause might be?
4 Replies
Issue is solved. I had just forgotten to implement the : IRequestHandler<CreateUserCommand, ErrorOr<User>> on my Handler class
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
Use the /close command to mark a forum thread as answered
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View