-
Notifications
You must be signed in to change notification settings - Fork 57
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
DataResponse: Add status code #544
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ryantxu
commented
Sep 29, 2022
ryantxu
commented
Sep 29, 2022
ryantxu
commented
Sep 29, 2022
bytes jsonMeta = 3; | ||
|
||
// Maps to raw HTTP status codes when passed over HTTP | ||
int32 status = 4; |
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.
adding line 148 is the one real protobuf change -- the rest are improved comments
ryantxu
commented
Sep 29, 2022
@ryantxu I have pushed a commit - LMK what you think 😄 |
sd2k
added a commit
to grafana/grafana-plugin-sdk-rust
that referenced
this pull request
Oct 19, 2022
Example of how grafana/grafana-plugin-sdk-go#544 may look in this SDK.
sd2k
added a commit
to grafana/grafana-plugin-sdk-rust
that referenced
this pull request
Oct 19, 2022
Example of how grafana/grafana-plugin-sdk-go#544 may look in this SDK.
sd2k
reviewed
Oct 19, 2022
Co-authored-by: Ben Sully <ben.sully88@gmail.com>
ryantxu
commented
Oct 20, 2022
@ryantxu just going to do a once over of the tests and the marshalling logic |
wbrowne
approved these changes
Nov 1, 2022
sd2k
added a commit
to grafana/grafana-plugin-sdk-rust
that referenced
this pull request
Nov 4, 2022
Example of how grafana/grafana-plugin-sdk-go#544 may look in this SDK.
This was referenced Nov 11, 2022
sd2k
added a commit
to grafana/grafana-plugin-sdk-rust
that referenced
this pull request
Jan 11, 2023
…or (#87) * Add 'status' code to 'DataQueryError'; default to Internal Server Error Example of how grafana/grafana-plugin-sdk-go#544 may look in this SDK. * Use custom DataQueryStatus enum instead of raw http status code This narrows down the choice of options for users, while still ensuring they choose a valid HTTP status code and allowing an escape hatch for custom statuses.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In an effort to provide a more consistent error handling behavior, this PR adds a status code on the DataResponse object.
This is a simpler version of #510 -- rather than trying to enumerate the possible status codes developers may want to use, this just trusts they can find something appropriate in the standard HTTP status code list.