feat: migrate app routes and business modules

This commit is contained in:
2026-08-12 18:22:59 +08:00
parent 555aa00043
commit cc706378c2
247 changed files with 28623 additions and 14988 deletions
+18
View File
@@ -0,0 +1,18 @@
export const isWriteOutcomeUnknown = (error) => {
if (!error || typeof error !== 'object') return false
if (
error.code === 'REQUEST_TIMEOUT' ||
error.code === 'NETWORK_ERROR' ||
error.code === 'RESPONSE_INVALID' ||
error.code === 'REQUEST_CANCELLED'
) {
return true
}
if (error.code !== 'HTTP_ERROR' && error.code !== 'BUSINESS_ERROR') return false
const status = Number(
error.code === 'HTTP_ERROR' ? error.httpStatus : error.businessCode
)
if (!Number.isInteger(status)) return true
return !(status >= 400 && status < 500 && status !== 408)
}