jackwener/OpenCLI · error · CommandExecutionError
MiniMax music returned unknown data.status ${data.status}
Error message
MiniMax music returned unknown data.status ${data.status} What it means
MiniMax music responses are only expected to carry data.status of 1 (in progress), 2 (complete), or the failure statuses handled earlier. Any other integer (0, 3, 5, negative, etc.) is an unrecognized state, so the client throws rather than proceeding with possibly-partial output.
Source
Thrown at clis/minimax/utils.js:113
throw new AuthRequiredError(region.host, `MiniMax ${region.host} rejected ${MINIMAX_API_KEY_VAR} (service ${base.status_code}${message}).`);
}
throw new CommandExecutionError(`MiniMax music failed (service ${base.status_code}${message})`);
}
const data = payload.data;
if (!data || typeof data !== 'object' || Array.isArray(data) || !Number.isInteger(data.status)) {
throw new CommandExecutionError('MiniMax music response is missing integer data.status');
}
if (data.status === 1) {
const traceId = typeof payload.trace_id === 'string' && /^[A-Za-z0-9_-]{1,128}$/.test(payload.trace_id.trim())
? payload.trace_id.trim()
: '';
throw new CommandExecutionError(
`MiniMax music returned status 1 (in progress) without a resumable task id${traceId ? ` (trace_id: ${traceId})` : ''}`,
'Do not resubmit blindly: this endpoint exposes no query command, so check MiniMax account history first.',
);
}
if (data.status !== 2) {
throw new CommandExecutionError(`MiniMax music returned unknown data.status ${data.status}`);
}
if (typeof data.audio !== 'string' || !data.audio.trim()) {
throw new CommandExecutionError('MiniMax music reported completion without data.audio');
}
return {
audio: data.audio.trim(),
expectedBytes: payload.extra_info == null ? null : parseExpectedSize(payload.extra_info),
};
}
function parseExpectedSize(extraInfo) {
if (!extraInfo || typeof extraInfo !== 'object' || Array.isArray(extraInfo)) {
throw new CommandExecutionError('MiniMax music returned malformed extra_info');
}
if (extraInfo.music_size == null) return null;
if (!Number.isSafeInteger(extraInfo.music_size) || extraInfo.music_size <= 0) {
throw new CommandExecutionError('MiniMax music returned invalid extra_info.music_size');
}View on GitHub (pinned to 49907e53dc)
Solutions
- Print data.status and the full response to identify the new code
- Check the current MiniMax music API docs for the meaning of the new status value
- Update the client's status handling (and this error message) to map the new status explicitly
- If the new status means failed, re-submit the generation request with the same parameters
Example fix
// before
if (data.status !== 2) { throw ...; }
// after
if (data.status === 3) { throw new CommandExecutionError('MiniMax music generation failed'); }
if (data.status !== 2) { throw new CommandExecutionError(`MiniMax music returned unknown data.status ${data.status}`); } Defensive patterns
Strategy: validation
Validate before calling
const KNOWN_STATUSES = new Set([1, 2]);
if (hasIntegerStatus(payload) && !KNOWN_STATUSES.has(payload.data.status)) {
console.warn(`Unrecognized MiniMax music status: ${payload.data.status} — check API changelog`);
} Type guard
function isKnownMusicStatus(s) {
return s === 1 || s === 2;
} Try / catch
try {
const result = parseCompletedMusic(payload);
} catch (e) {
const m = e.message.match(/unknown data\.status (\d+)/);
if (m) {
console.error(`New MiniMax status code ${m[1]} — consult current API docs`);
} else throw e;
} Prevention
- Subscribe to MiniMax API changelog/release notes
- Handle status codes exhaustively and log unknown values
- Test against both sandbox and production endpoints
- Version-pin the API surface your client targets
When it happens
Trigger: MiniMax introduces a new status code (e.g. 3 = failed, 4 = expired) or returns 0 for queued/not-started, and the client version predates that value.
Common situations: MiniMax API update adding new lifecycle states; querying a job that failed with a code the old client does not know; sandbox vs production endpoints emitting different status enums.
Related errors
- MiniMax music response is missing integer data.status
- MiniMax music returned status 1 (in progress) without a resu
- MiniMax music reported completion without data.audio
- MiniMax music returned malformed extra_info
- MiniMax music returned invalid extra_info.music_size
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/8b993e5b5a4d42a8.
Report an issue: GitHub.