Add error catch to results of backend response #12
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.
Why do we need this feature?
In the context of the reported issue, with
redshiftAsyncQueryDataSupport
= false, the error runs through: https://github.com/grafana/grafana/blob/9e1ea8c990d4d52d3db518ec6e3e75422730be3a/packages/grafana-runtime/src/utils/DataSourceWithBackend.ts#L231This PR provides the same error handling in order to trigger the same error display.
Which issue(s) does this PR fix?:
Contributes to grafana/redshift-datasource#209
Need to release this in a bumped version, bump the async-query-data versions in Redshift (and Athena) and release Redshift (and Athena) to fix the reported issue.
Special notes for your reviewer:
Local testing:
"@grafana/async-query-data"
in thedependencies
object to"0.1.4",
It should read:
(This step is not strictly required but has unified the version of
async-query-data
in Redshift and made the following step easier to manage. This version will be bumped again in Redshift and Athena after this PR is merged, so I don't think it's a big deal to do this locally for testing purposes...)grafana-async-query-data-js
, pull these changes.yarn build
dist
andnode_modules
to start from a clean state. Build the backend withmage
. For the frontend,yarn install
first. Copy thedist
fromgrafana-async-query-data-js
repo and replace thedist
in thenode_modules
in Redshift repo.yarn dev
oryarn build
.Huge thanks to @kevinwcyu for all the help in finding this one