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

validator API endpoint 400 vs 405 status #2035

Closed
protolambda opened this issue Dec 2, 2020 · 1 comment
Closed

validator API endpoint 400 vs 405 status #2035

protolambda opened this issue Dec 2, 2020 · 1 comment

Comments

@protolambda
Copy link

Description

Minor API issue (sorry for nitpick), working on testing the whole lighthouse API surface for consistency with spec, and generating test vectors for bindings!

Issue: /eth/v1/beacon/states/100/validators/morty returns 405 (unknown route) status instead of 400 (invalid validator ID)

Version

v1.0.3

Present Behaviour

405

Expected Behaviour

400

Steps to resolve

Change routing logic to match any validator ID format, and only then return a correct error code when parsing in detail.

@realbigsean
Copy link
Member

realbigsean commented Dec 2, 2020

working on testing the whole lighthouse API surface for consistency with spec, and generating test vectors for bindings!

Hero!

Thanks for pointing this out. I've made a PR for this that also updates some other endpoints where I think we had the same inconsistency.

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