diff --git a/public/app/features/manage-dashboards/utils/validation.ts b/public/app/features/manage-dashboards/utils/validation.ts index 7e4b1d9089e..d70e22ed975 100644 --- a/public/app/features/manage-dashboards/utils/validation.ts +++ b/public/app/features/manage-dashboards/utils/validation.ts @@ -53,6 +53,12 @@ export const validateUid = (value: string) => { }) .catch((error) => { error.isHandled = true; + + // when Editor user tries to import admin only dashboard (with same uid) he gets an unhelpful 403 error + // therefore handling this use case to return some indication of whats wrong + if (error.status === 403) { + return 'Dashboard with the same UID already exists'; + } return true; }); };