Skip to content

Commit

Permalink
feat: throw 451 instead of interval error
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <wonglam@amazon.com>
  • Loading branch information
wanglam committed Jul 20, 2023
1 parent 4676414 commit 79ce423
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import { i18n } from '@osd/i18n';
import Boom from '@hapi/boom';

import {
OpenSearchDashboardsRequest,
Expand All @@ -22,8 +23,9 @@ import {
WorkspacePermissionMode,
} from '../workspace_permission_control';

// Can't throw unauthorized for now, the page will be refreshed if unauthorized
const generateWorkspacePermissionError = () =>
new Error(
Boom.illegal(
i18n.translate('workspace.permission.invalidate', {
defaultMessage: 'Invalidate workspace permission',
})
Expand Down

0 comments on commit 79ce423

Please sign in to comment.