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

api/txpool/broadcast HTTP status error handling #176

Closed
Alrighttt opened this issue Sep 10, 2024 · 0 comments · Fixed by #177
Closed

api/txpool/broadcast HTTP status error handling #176

Alrighttt opened this issue Sep 10, 2024 · 0 comments · Fixed by #177
Labels
bug Something isn't working

Comments

@Alrighttt
Copy link

Current Behavior

Using the endpoint, POST api/txpool/broadcast, if an invalid transaction is provided, the user will receive a HTTP 500 response.

Example

invalid v2 transaction set: transaction txid:04ad8fd61964efc37f8df21a43a3f792e03635e0efc604d52aff58c53d35657e is invalid: siacoin input 0 failed to satisfy spend policy: invalid signature

Expected Behavior

I would expect to receive a HTTP status code of 400 since this is an error in the client behavior, providing an invalid signature.

Steps to Reproduce

  1. Attempt to send a transaction via POST api/txpool/broadcast with an invalid signature

Version

b256f1a

What operating system did the problem occur on (e.g. Ubuntu 22.04, macOS 12.0, Windows 11)?

docker image built from Dockerfile / alpine

Anything else?

I've not looked in depth for any other instances of this, but it's worth looking at other endpoints to see if any client related errors also return HTTP 500.

@Alrighttt Alrighttt added the bug Something isn't working label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant