chatboxai/chatbox · error · ApiError
Status Code ${retryRes.status}, ${sanitizeResponseBody(retry
Error message
Status Code ${retryRes.status}, ${sanitizeResponseBody(retryRes.status, response)} What it means
Error "Status Code ${retryRes.status}, ${sanitizeResponseBody(retryRes.status, response)}" thrown in chatboxai/chatbox.
Source
Thrown at src/shared/request/request.ts:304
}
console.debug('🔄 Retrying request with new token...')
const retryRes = await fetch(url, init)
if (!retryRes.ok) {
const response = await retryRes.text().catch((e: unknown) => {
console.error('[authenticatedAfetch] Failed to read retry error response body:', e)
return ''
})
const requestId = getChatboxRequestId(response, retryRes.headers)
if (options.parseChatboxRemoteError) {
const backendErrorCode = getChatboxErrorCode(response)
const chatboxAIError = ChatboxAIAPIError.fromCodeName(response, backendErrorCode || '', requestId)
if (chatboxAIError) {
throw chatboxAIError
}
}
throw new ApiError(
`Status Code ${retryRes.status}, ${sanitizeResponseBody(retryRes.status, response)}`,
response || undefined,
retryRes.status,
requestId
)
}
return retryRes
}
// 其他错误状态码
if (!res.ok) {
const response = await res.text().catch((e: unknown) => {
console.error('[authenticatedAfetch] Failed to read error response body:', e)
return ''
})
const requestId = getChatboxRequestId(response, res.headers)
if (options.parseChatboxRemoteError) {View on GitHub (pinned to 81571269ad)
Solutions
- The request still failed after a token refresh; read the sanitized body in the error for the upstream reason.
- If status is still 401 after refresh, the account/session is invalid — log in again.
- For 429/5xx after refresh, back off and retry later.
Example fix
if (!retryRes.ok) {
const response = await retryRes.text()
// Fresh token did not help; inspect status and body, then re-login or retry
} When it happens
Trigger: Thrown at src/shared/request/request.ts:304 when the library encounters an invalid state.
Common situations: Occurs in src/shared/request/request.ts when the retried request after a token refresh still returns a non-success HTTP status.
AI-assisted analysis of chatboxai/chatbox@81571269ad (2026-08-12).
Data as JSON: /api/errors/aaf615af9787c961.
Report an issue: GitHub.