mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: Suppress 403 preloading errors (#79154)
* fix: stop displaying error alerts when plugins cannot be loaded * fix: only hide the error if it is a 403 error * fix: revert unnecessary object spreading
This commit is contained in:
parent
42ce9bd9f0
commit
ebdffe21e6
@ -18,7 +18,13 @@ export function getPluginSettings(pluginId: string, options?: Partial<BackendSrv
|
||||
pluginInfoCache[pluginId] = settings;
|
||||
return settings;
|
||||
})
|
||||
.catch(() => {
|
||||
.catch((e) => {
|
||||
// User does not have access to plugin
|
||||
if (typeof e === 'object' && e !== null && 'status' in e && e.status === 403) {
|
||||
e.isHandled = true;
|
||||
return Promise.reject(e);
|
||||
}
|
||||
|
||||
return Promise.reject(new Error('Unknown Plugin'));
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user