Skip to content

Commit

Permalink
fix: json-rpc error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Ez3kiel-dev committed Jan 16, 2024
1 parent 104b30e commit 5876dc9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/repositories/rpc_client_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,19 +232,19 @@ sealed class RpcClientRepository {
} else if (json
case {
'id': final int id,
// 'jsonrpc': '2.0',
'jsonrpc': '2.0',
'error': {
'code': final int code,
'message': final String message,
'json': final dynamic data
// 'json': final dynamic data
}
}) {
if (_pendingRequests[id] != null) {
_pendingRequests[id]!.completer.completeError(
json_rpc_2.RpcException(
code,
message,
data: data,
// data: data,
),
);
_pendingRequests.remove(id);
Expand Down

0 comments on commit 5876dc9

Please sign in to comment.