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

Improve error message of missing or invalid params #211

Merged
merged 2 commits into from
Aug 11, 2020

Conversation

ebkalderon
Copy link
Owner

Changed

  • Improve log message quality and reduce noise.

Fixed

  • Report missing params field (for messages that require it) as "invalid params" instead of "parse error."

@ebkalderon ebkalderon self-assigned this Aug 11, 2020
@ebkalderon ebkalderon force-pushed the expand-invalid-params-case branch 2 times, most recently from 1e6761d to 29ba44d Compare August 11, 2020 12:36
These changes let us identify when a required `params` field has been
omitted and correctly report it as a "invalid params" error instead of a
"parse error" and also provide detailed output from `serde_json::Error`
in the `message` field, if there is any.

We also take the opportunity to eliminate most of the noisy duplicate
logging calls in `handle_request()`. We will provide this info to the
user at the transport layer instead, starting in the next commit.
@ebkalderon ebkalderon merged commit 5265224 into master Aug 11, 2020
@ebkalderon ebkalderon deleted the expand-invalid-params-case branch August 11, 2020 12:50
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 this pull request may close these issues.

1 participant