mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Enable useUnknownInCatchVariables for stricter type checking in catch blocks (#50591)
* wrap a bunch of errors * wrap more things! * fix up some unit tests * wrap more errors * tiny bit of tidy up
This commit is contained in:
@@ -6,7 +6,7 @@ import { Subscription } from 'rxjs';
|
||||
|
||||
import { FieldConfigSource, GrafanaTheme2 } from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { locationService } from '@grafana/runtime';
|
||||
import { isFetchError, locationService } from '@grafana/runtime';
|
||||
import {
|
||||
HorizontalGroup,
|
||||
InlineSwitch,
|
||||
@@ -163,7 +163,9 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
|
||||
await saveAndRefreshLibraryPanel(this.props.panel, this.props.dashboard.meta.folderId!);
|
||||
this.props.notifyApp(createPanelLibrarySuccessNotification('Library panel saved'));
|
||||
} catch (err) {
|
||||
this.props.notifyApp(createPanelLibraryErrorNotification(`Error saving library panel: "${err.statusText}"`));
|
||||
if (isFetchError(err)) {
|
||||
this.props.notifyApp(createPanelLibraryErrorNotification(`Error saving library panel: "${err.statusText}"`));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user