-
Notifications
You must be signed in to change notification settings - Fork 782
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
[Merged by Bors] - Validators endpoint status code #2040
[Merged by Bors] - Validators endpoint status code #2040
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a block_task
is overkill here, this closure is so small we don't need to worry about it blocking the core executor:
.and(warp::path::param::<ValidatorId>().or_else(|_| async {
Err(warp_utils::reject::custom_bad_request(
"Invalid validator ID".to_string(),
))
}))
Let me know your thoughts.
Yep, makes sense. Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
bors r+ |
## Issue Addressed Resolves #2035 ## Proposed Changes Update 405's to 400's for failures when we are parsing path params. ## Additional Info Haven't updated the same for non-standard endpoints Co-authored-by: realbigsean <[email protected]>
Pull request successfully merged into unstable. Build succeeded: |
Issue Addressed
Resolves #2035
Proposed Changes
Update 405's to 400's for failures when we are parsing path params.
Additional Info
Haven't updated the same for non-standard endpoints