forked from baron/baron-sso
감사 로그 403 시 권한 안내 문구로 표시
This commit is contained in:
@@ -168,9 +168,19 @@ function AuditLogsPage() {
|
||||
}
|
||||
|
||||
if (query.error) {
|
||||
const errMsg =
|
||||
(query.error as AxiosError<{ error?: string }>).response?.data?.error ??
|
||||
(query.error as Error).message;
|
||||
const axiosError = query.error as AxiosError<{ error?: string }>;
|
||||
if (axiosError.response?.status === 403) {
|
||||
return (
|
||||
<div className="p-8 text-center text-red-500">
|
||||
{t(
|
||||
"msg.dev.audit.forbidden",
|
||||
"감사 로그를 조회할 권한이 없습니다. 관리자에게 권한을 요청해주세요.",
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const errMsg = axiosError.response?.data?.error ?? (query.error as Error).message;
|
||||
return (
|
||||
<div className="p-8 text-center text-red-500">
|
||||
{t("msg.dev.audit.load_error", "Error loading logs: {{error}}", {
|
||||
|
||||
Reference in New Issue
Block a user