mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Datasource Config: Return error object on failed updates (again) (#89906)
* refactor(datasource): only pass back the error information when rejecting ds updates * revert(datasource): remove stray console import * refactor(datasource-config): update traceId to traceID
This commit is contained in:
parent
be98ab1111
commit
965cdef855
@ -276,8 +276,8 @@ export function updateDataSource(dataSource: DataSourceSettings) {
|
||||
const formattedError = parseHealthCheckError(err);
|
||||
|
||||
dispatch(testDataSourceFailed(formattedError));
|
||||
|
||||
return Promise.reject(err);
|
||||
const errorInfo = isFetchError(err) ? err.data : { message: 'An unexpected error occurred.', traceID: '' };
|
||||
return Promise.reject(errorInfo);
|
||||
}
|
||||
|
||||
await getDatasourceSrv().reload();
|
||||
|
Loading…
Reference in New Issue
Block a user