fix(frontend): preserve timeout label success toast
Build and publish Docker images / Build and publish images (push) Successful in 2m21s

This commit is contained in:
2026-09-16 09:45:52 +08:00
parent 1cef2501ba
commit a0c6969da0
2 changed files with 12 additions and 1 deletions
@@ -133,7 +133,12 @@ const normalizeAPIErrorText = (message, status) => {
if (/^(network error|failed to fetch|network request failed)$/i.test(text)) {
return '网络连接失败,请检查网络后重试。';
}
if (/timeout|timed out|超时/i.test(text)) {
if (
/\b(?:timeout|timed out)\b/i.test(text) ||
/(?:^|(?:请求|连接|操作|网络|服务|服务器|上游)[^,。!?;;::]{0,8})超时(?:[,。!?;;:]|$)/.test(
text
)
) {
return '请求超时,请稍后再试。';
}
if (/^invalid email or password$/i.test(text)) {