Skip to content

Commit

Permalink
HttpClient: better re-throw
Browse files Browse the repository at this point in the history
So that we get the original text (supposedly JSON) that
was being parsed. This would mitigate how horrible this
crash/stacktrace was:

https://github.com/nblockchain/geewallet/actions/runs/5711209999/job/15472500980
  • Loading branch information
knocte committed Jul 31, 2023
1 parent deb42c9 commit e3d2e8f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/JsonRpcSharp.HttpClient/HttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ protected override async Task<RpcResponseMessage> SendAsync(RpcRequestMessage re
var originalText = GetOriginalText(streamReader);
throw new DeserializationException(originalText, e);
}
catch (JsonSerializationException e)
{
var originalText = GetOriginalText(streamReader);
throw new DeserializationException(originalText, e);
}
/* for debugging purposes
finally
{
Expand Down

0 comments on commit e3d2e8f

Please sign in to comment.