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

[BUG] DataSourceError swallows error type attribute which is used by plugins #6450

Closed
Tracked by #5872
BionIT opened this issue Apr 15, 2024 · 0 comments · Fixed by #6496
Closed
Tracked by #5872

[BUG] DataSourceError swallows error type attribute which is used by plugins #6450

BionIT opened this issue Apr 15, 2024 · 0 comments · Fixed by #6496
Assignees
Labels
bug Something isn't working multiple datasource multiple datasource project v2.14.0

Comments

@BionIT
Copy link
Collaborator

BionIT commented Apr 15, 2024

Describe the bug
DataSourceError object swallows body.error.type from the error object causing a few plugins to have 500 error, eg anomaly detection (see ref https://github.com/search?q=repo%3Aopensearch-project%2Fanomaly-detection-dashboards-plugin%20body.error.type&type=code), index management (see ref https://github.com/search?q=repo%3Aopensearch-project%2Findex-management-dashboards-plugin%20body.error.type&type=code)

Expected behavior
The DataSourceError was thrown as a general error when failed to make a request to data source, see ref https://github.com/opensearch-project/OpenSearch-Dashboards/blame/476cffc2f793b424d68981aaaee9aa1f9fd958be/src/plugins/data_source/server/legacy/configure_legacy_client.ts#L92, we should not swallow the error type causing 500 errors due to missing prop.

OpenSearch Version
Please list the version of OpenSearch being used.

Dashboards Version
Please list the version of OpenSearch Dashboards being used.

Plugins

Please list all plugins currently enabled.

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Browser and version [e.g. 22]

Additional context

Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working multiple datasource multiple datasource project v2.14.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant