Skip to content

JSON RPC Client doesn't handle RPC errors. #672

@rossmcf

Description

@rossmcf

If the server responds with a valid JSON RPC response, containing an error (e.g. see below), the client does not recognise this, and continues to attempt to decode the empty result field.

{ "jsonrpc": "2.0", "error": { "code": -32603, "message": "JWT Token is expired" } }

On receipt of an error like this, I'd like the endpoint to return a nil result (the JSON RPC spec says that Error and Result cannot co-exist in a response) and an error. It might also be useful to have a server option that can allow the error to be mapped to a different error type, or perhaps swallowed altogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions