You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Errors returned by the Electrum JSON-RPC API in esplora-electrs are not following the JSON-RPC 2.0 Specification which causes clients integration problems (e.g. checksum0/go-electrum#5).
An error is returned as a string while an error object is expected.
Here we provide a workaround for servers that don't follow
the JSON-RPC 2.0 specification for error objects.
According to the specification, error should be an object
containing `code`, `message`, and `data` properties
(see: https://www.jsonrpc.org/specification#error_object).
Unfortunatelly Electrs returns error as a string
(see: Blockstream/esplora#453).
We define an error unmarshaling function to handle both types
of errors.
nkuba
added a commit
to keep-network/go-electrum
that referenced
this issue
May 16, 2023
Here we provide a workaround for servers that don't follow the
JSON-RPC 2.0 specification for error objects.
According to the specification, an error should be an object
containing `code`, `message`, and `data` properties
(see: https://www.jsonrpc.org/specification#error_object).
Unfortunately, Electrs returns an error as a string
(see: Blockstream/esplora#453).
We define an error unmarshaling function to handle both types of errors.
Errors returned by the Electrum JSON-RPC API in esplora-electrs are not following the JSON-RPC 2.0 Specification which causes clients integration problems (e.g. checksum0/go-electrum#5).
An error is returned as a string while an error object is expected.
Sample output for esplora-electrs:
Alternative Electrum server implementations follow the standard. Examples:
- ElectrumX
- Fulcrum
The text was updated successfully, but these errors were encountered: