diff --git a/frontend/src/components/evaluations/EvaluationDetail.vue b/frontend/src/components/evaluations/EvaluationDetail.vue index 3dfd97bf9..812f9f667 100644 --- a/frontend/src/components/evaluations/EvaluationDetail.vue +++ b/frontend/src/components/evaluations/EvaluationDetail.vue @@ -432,10 +432,14 @@ const fetchEvaluation = async () => { try { loading.value = true - const { data } = await useFetchApi( + const { data, response } = await useFetchApi( `/evaluations/${props.evaluationId}` ).json() + if (response?.status === 403 || data.value?.code === 'AUTH-ERR-2') { + return (window.location.href = '/errors/unauthorized') + } + if (!data.value) { throw new Error(data.value?.msg || 'Failed to fetch evaluation') }