-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fix(ui): add error messaging for cells in dashdboard view #17754
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.
Gaps!
@@ -13,7 +13,7 @@ | |||
|
|||
See https://github.com/influxdata/flux/blob/master/docs/SPEC.md#errors. | |||
*/ | |||
export const checkQueryResult = (file: string): void => { | |||
export const checkQueryResult = (file: string = ''): void => { |
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.
what does this do?
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.
checkQueryResult is called here
checkQueryResult(result.csv) |
At runtime, result.csv
may be undefined (not a string) when there is an error. The code immediately above the call to checkQueryResult throws a runtime error which will hide the fact that checkQueryResult will throw its own error when result.csv
is not a string.
By adding a default value to the parameter we prevent checkQueryResult from throwing its own error (which would be visible in the console should the throws above it are ever removed).
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.
@alexpaxton Gaps are removed. I have updated the screenshots. |
Closes #17594
Add error messaging for cells in the Dashboard View.
Example: when one cell has error
Example: when all cells have error