{"record":{"id":"42d41c95d6064fe5","repo":"chenhg5/cc-connect","slug":"mimo-tts-api-d-s","errorCode":null,"errorMessage":"mimo tts API %d: %s","messagePattern":"mimo tts API (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/tts.go","lineNumber":493,"sourceCode":"\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"mimo tts: create request: %w\", err)\n\t}\n\t// MiMo authenticates via \"api-key\" header, not \"Authorization: Bearer\".\n\treq.Header.Set(\"api-key\", m.APIKey)\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tresp, err := m.Client.Do(req)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"mimo tts: request: %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"mimo tts: read response: %w\", err)\n\t}\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, \"\", fmt.Errorf(\"mimo tts API %d: %s\", resp.StatusCode, body)\n\t}\n\n\tvar result struct {\n\t\tChoices []struct {\n\t\t\tMessage struct {\n\t\t\t\tAudio struct {\n\t\t\t\t\tData string `json:\"data\"`\n\t\t\t\t} `json:\"audio\"`\n\t\t\t} `json:\"message\"`\n\t\t} `json:\"choices\"`\n\t\tError *struct {\n\t\t\tMessage string `json:\"message\"`\n\t\t\tType    string `json:\"type\"`\n\t\t\tCode    any    `json:\"code\"`\n\t\t} `json:\"error\"`\n\t}\n\tif err := json.Unmarshal(body, &result); err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"mimo tts: parse response: %w\", err)","sourceCodeStart":475,"sourceCodeEnd":511,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/core/tts.go#L475-L511","documentation":"The MiMo TTS HTTP API returned a non-200 status during Synthesize. The error embeds the status code and a snippet of the response body so callers can distinguish auth failures, quota errors, and server-side faults.","triggerScenarios":"Thrown at core/tts.go:493 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check API key/quota on 401/403/429","Inspect the embedded body; retry on transient 5xx"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}