We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is your feature request related to a problem? Please describe.
export async function getDataSourceById( id: string, savedObjectsClient: SavedObjectsClientContract ) { const response = await savedObjectsClient.get('data-source', id); if (!response || response.error) { throw new Error('Unable to find data source'); } const attributes: any = response?.attributes || {}; return { id: response.id, title: attributes.title, endpoint: attributes.endpoint, description: attributes.description || '', auth: attributes.auth, }; }
This function only return generic error, and the usage of this function not handle the network error, we need to add the handling for this part
Describe the solution you'd like
Use OsdError instead of Error Add test for non-OsdError to mock network issue Describe alternatives you've considered
OsdError
Error
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/data_source_management/public/components/utils.ts#L153
Sorry, something went wrong.
Hi @yujin-emma, are we targeting to address this in 2.15 or 2.16?
yujin-emma
No branches or pull requests
Is your feature request related to a problem? Please describe.
This function only return generic error, and the usage of this function not handle the network error, we need to add the handling for this part
Describe the solution you'd like
Use
OsdError
instead ofError
Add test for non-OsdError to mock network issue
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: