1
0
forked from baron/baron-sso

감사 로그 403 시 권한 안내 문구로 표시

This commit is contained in:
2026-03-03 14:10:44 +09:00
parent c9b780659f
commit b2dae93ac1
4 changed files with 16 additions and 3 deletions

View File

@@ -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}}", {