Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmk committed Oct 12, 2024
1 parent 2f8e90e commit a64fd08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/NATS.Client.JetStream/NatsJSContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ internal async ValueTask<NatsJSResponse<TResponse>> JSRequestAsync<TRequest, TRe
return (default, new NatsJSException($"Unknown response type {typeof(TResponse)}"));
}

var response = (TResponse?)errorElement.Deserialize(jsonTypeInfo);
var response = (TResponse?)jsonDocument.RootElement.Deserialize(jsonTypeInfo);

if (msg.Error is { } messageError)
{
Expand Down
2 changes: 1 addition & 1 deletion src/NATS.Client.JetStream/NatsJSJsonSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static class NatsJSJsonSerializer<T>
internal partial class NatsJSJsonSerializerContext : JsonSerializerContext
{
#if NET6_0
internal static readonly NatsJSJsonSerializerContext DefaultContext = NatsJSJsonSerializerContext.Default;
internal static readonly NatsJSJsonSerializerContext DefaultContext = new NatsJSJsonSerializerContext(new JsonSerializerOptions());
#else
internal static readonly NatsJSJsonSerializerContext DefaultContext = new NatsJSJsonSerializerContext(new JsonSerializerOptions
{
Expand Down

0 comments on commit a64fd08

Please sign in to comment.