Bladeren bron

fix(web): handle s8 task action business errors

The submit handler in S8TaskDetailPage used try/finally with no catch,
so business 4xx responses surfaced in the console as "Uncaught (in
promise)" even though the axios interceptor had already shown the
ElMessage error to the user.

Add an empty catch alongside the finally to swallow the rejection after
the user-visible toast has been shown.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
YY968XX 1 maand geleden
bovenliggende
commit
bea9e11f91
1 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 3 0
      Web/src/views/aidop/s8/exceptions/S8TaskDetailPage.vue

+ 3 - 0
Web/src/views/aidop/s8/exceptions/S8TaskDetailPage.vue

@@ -152,6 +152,9 @@ async function submitAction() {
 		ElMessage.success(`${actionTitle()}成功`);
 		dialogVisible.value = false;
 		await loadDetail();
+	} catch {
+		// 业务 4xx 已由 axios 响应拦截器以 ElMessage.error 提示用户;
+		// 这里吞掉拒绝以避免冒泡为浏览器 "Uncaught (in promise)"。
 	} finally {
 		submitting.value = false;
 	}