CherryHQ/cherry-studio · error · APICallError
parsed.base_resp.status_msg || `MiniMax error ${parsed.base_
Error message
parsed.base_resp.status_msg || `MiniMax error ${parsed.base_resp.status_code}` What it means
Thrown as an `APICallError` when a 2xx MiniMax response carries a non-zero `base_resp.status_code`. MiniMax signals application-level failures (content moderation, invalid model, param errors) inside an otherwise-OK HTTP response via the `base_resp` object, rather than with an HTTP error status. The message is `base_resp.status_msg`, falling back to `MiniMax error {code}`.
Source
Thrown at src/main/ai/provider/custom/minimax/minimaxImageModel.ts:117
}
let parsed: MinimaxImageResponse
try {
parsed = JSON.parse(responseBody) as MinimaxImageResponse
} catch (cause) {
throw new APICallError({
message: 'Invalid JSON response from MiniMax',
cause,
url,
requestBodyValues: body,
statusCode: response.status,
responseHeaders: headersRecord,
responseBody
})
}
if (parsed.base_resp?.status_code && parsed.base_resp.status_code !== 0) {
throw new APICallError({
message: parsed.base_resp.status_msg || `MiniMax error ${parsed.base_resp.status_code}`,
url,
requestBodyValues: body,
statusCode: response.status,
responseHeaders: headersRecord,
responseBody
})
}
return {
images: [...(parsed.data?.image_urls ?? []), ...(parsed.data?.image_base64 ?? [])],
warnings: [],
response: {
timestamp: this.config._internal?.currentDate?.() ?? new Date(),
modelId: this.modelId,
headers: headersRecord
}
}View on GitHub (pinned to 726446b54c)
Solutions
- Read `base_resp.status_msg` and `status_code` for the specific business error and adjust the request.
- For content-moderation rejections, revise the prompt or subject-reference image.
- Confirm the model id is valid and enabled, and that params match its documented constraints.
Defensive patterns
Strategy: try-catch
Type guard
const isMinimaxBusinessError = (e: unknown): boolean => e instanceof APICallError && /MiniMax error/.test(e.message)
Try / catch
try {
await model.doGenerate(opts)
} catch (e) {
if (e instanceof APICallError && e.message.includes('MiniMax error')) {
// base_resp business error — read e.message for status_msg, adjust prompt/params
}
throw e
} Prevention
- Remember MiniMax returns business errors inside 2xx via base_resp — don't rely on HTTP status alone
- Surface status_msg to the user
- Revise prompts/params on content-moderation rejections
When it happens
Trigger: HTTP succeeded but MiniMax's business logic rejected the request: prompt failed content review, the model id is invalid/unavailable, or a parameter value is semantically invalid for the chosen model.
Common situations: Prompt or subject-reference image tripped MiniMax content moderation; requested model not enabled for the account; `aspect_ratio`/`size` not supported by the selected model.
Related errors
- responseBody || response.statusText
- Rerank response must contain a results array
- ${action} failed: ${unwrapped.msg || unwrapped.message || `c
- Socket Mode connection failed: ${data.error ?? 'no URL retur
- Slack API error ${method}: HTTP ${response.status} - ${error
AI-assisted analysis of CherryHQ/cherry-studio@726446b54c (2026-08-12).
Data as JSON: /api/errors/7b1aab3ebbad0760.
Report an issue: GitHub.