1
0
forked from baron/baron-sso

역할별 403 권한 안내 문구 일관화

This commit is contained in:
2026-03-19 13:34:47 +09:00
parent 07f4c1258c
commit 44231b1c2e
7 changed files with 136 additions and 10 deletions

View File

@@ -18,6 +18,7 @@ import {
} from "../../components/ui/avatar";
import { Badge } from "../../components/ui/badge";
import { Button } from "../../components/ui/button";
import { ForbiddenMessage } from "../../components/common/ForbiddenMessage";
import {
Card,
CardContent,
@@ -133,9 +134,12 @@ function ClientsPage() {
}
if (clientError) {
const axiosError = clientError as AxiosError<{ error?: string }>;
if (axiosError.response?.status === 403) {
return <ForbiddenMessage resourceToken="clients" />;
}
const errMsg =
(clientError as AxiosError<{ error?: string }>).response?.data?.error ??
(clientError as Error).message;
axiosError.response?.data?.error ?? (clientError as Error).message;
return (
<div className="p-8 text-center text-red-500">
{t("msg.dev.clients.load_error", "Error loading clients: {{error}}", {