fix: include a link and more useful error details for 403 response codes (#16644)

Currently if a user gets to a page they don't have permission to view
they're greeted with a vague error alert and no actionable items. This
PR adds a link back to _/workspaces_ within the alert as well as more
helpful error details.

Before:
![Screenshot 2025-02-20 at 11 06
06 AM](https://github.com/user-attachments/assets/cea5b86d-673b-482b-ac0b-f132eb518910)

After:
![Screenshot 2025-02-20 at 11 06
19 AM](https://github.com/user-attachments/assets/6bf0e9fd-fc51-4d9a-afbc-fea9f0439aff)
This commit is contained in:
brettkolodny
2025-02-21 16:26:07 -05:00
committed by GitHub
parent f8a49f4984
commit a376e8dbfe
7 changed files with 48 additions and 23 deletions

View File

@ -19,18 +19,7 @@ import {
onChangeTrimmed,
} from "utils/formUtils";
import * as Yup from "yup";
export const Language = {
emailLabel: "Email",
passwordLabel: "Password",
usernameLabel: "Username",
nameLabel: "Full name",
emailInvalid: "Please enter a valid email address.",
emailRequired: "Please enter an email address.",
passwordRequired: "Please enter a password.",
createUser: "Create",
cancel: "Cancel",
};
import { Language } from "./Language";
export const authMethodLanguage = {
password: {