forked from baron/baron-sso
역할별 403 권한 안내 문구 일관화
This commit is contained in:
@@ -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}}", {
|
||||
|
||||
Reference in New Issue
Block a user