Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TX post RPC errors not passed to client #132

Closed
philippem opened this issue Dec 3, 2024 · 1 comment · Fixed by #133
Closed

TX post RPC errors not passed to client #132

philippem opened this issue Dec 3, 2024 · 1 comment · Fixed by #133

Comments

@philippem
Copy link
Collaborator

When broadcasting a tx using POST to /tx, errors from the RPC request are not returned to the client; the client, including esplora, now only sees "RPC error":

client:

 % curl -X POST localhost:3001/tx
RPC error%                                                                   

electrs:

INFO handle POST /tx
DEBUG RPC HTTP 500 error: {"result":null,"error":{"code":-22,"message":"TX decode failed. Make sure the tx has at least one input."},"id":179}
WARN HttpError(400, "RPC error")

This behaviour may have changed recently?

@shesek
Copy link
Collaborator

shesek commented Dec 3, 2024

I opened #133 with a fix.

This behaviour may have changed recently?

Looking at the code, this does not appear to be a regression - the faulty line was there since the 2019 commit that introduced the transaction broadcast endpoint.

However I think that I do remember seeing useful RPC errors for transaction broadcast in the past... not quite sure how though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants