{"record":{"id":"5a196cb88feae493","repo":"router-for-me/CLIProxyAPI","slug":"failed-to-parse-codex-live-multipart-body-w","errorCode":null,"errorMessage":"failed to parse Codex live multipart body: %w","messagePattern":"failed to parse Codex live multipart body: %w","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"internal/client/codex/live/live.go","lineNumber":635,"sourceCode":"\treturn encoded, upstreamModel, nil\n}\n\nfunc multipartCallRequest(body []byte, boundary string) ([]byte, string, string, error) {\n\tif boundary == \"\" {\n\t\treturn nil, \"\", \"\", errors.New(\"Codex live multipart boundary is missing\")\n\t}\n\n\treader := multipart.NewReader(bytes.NewReader(body), boundary)\n\tvar sdp *string\n\tvar session json.RawMessage\n\tmodel := \"\"\n\tfor {\n\t\tpart, errPart := reader.NextPart()\n\t\tif errors.Is(errPart, io.EOF) {\n\t\t\tbreak\n\t\t}\n\t\tif errPart != nil {\n\t\t\treturn nil, \"\", \"\", fmt.Errorf(\"failed to parse Codex live multipart body: %w\", errPart)\n\t\t}\n\t\tpartBody, errRead := io.ReadAll(part)\n\t\terrClose := part.Close()\n\t\tif errRead != nil {\n\t\t\treturn nil, \"\", \"\", fmt.Errorf(\"failed to read Codex live multipart field: %w\", errRead)\n\t\t}\n\t\tif errClose != nil {\n\t\t\treturn nil, \"\", \"\", fmt.Errorf(\"failed to close Codex live multipart field: %w\", errClose)\n\t\t}\n\n\t\tswitch part.FormName() {\n\t\tcase \"sdp\":\n\t\t\tvalue := string(partBody)\n\t\t\tsdp = &value\n\t\tcase \"session\":\n\t\t\tif !json.Valid(partBody) {\n\t\t\t\treturn nil, \"\", \"\", errors.New(\"Codex live session field must contain valid JSON\")\n\t\t\t}","sourceCodeStart":617,"sourceCodeEnd":653,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/client/codex/live/live.go#L617-L653","documentation":"Error \"failed to parse Codex live multipart body: %w\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/client/codex/live/live.go:635 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send a well-formed multipart body with a valid boundary header.","Verify the Content-Type header includes the correct boundary parameter."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}