Skip to content

Commit ddc1133

Browse files
committed
don't serialize if already string
1 parent 05c8c89 commit ddc1133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Thirdweb/Thirdweb.RPC/ThirdwebRPC.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ private async Task SendBatchAsync(List<RpcRequest> batch)
203203
}
204204
catch
205205
{
206-
revertMsg = JsonConvert.SerializeObject(rpcResponse.Error.Data);
206+
revertMsg = rpcResponse.Error.Data is string ? rpcResponse.Error.Data.ToString() : JsonConvert.SerializeObject(rpcResponse.Error.Data);
207207
}
208208
}
209209
tcs.SetException(new Exception($"RPC Error for request {rpcResponse.Id}: {rpcResponse.Error.Message} {revertMsg}"));

0 commit comments

Comments
 (0)