{"record":{"id":"78d7220cb1518f6f","repo":"router-for-me/CLIProxyAPI","slug":"failed-to-read-codex-live-request-w","errorCode":null,"errorMessage":"failed to read Codex live request: %w","messagePattern":"failed to read Codex live request: %w","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"internal/client/codex/live/live.go","lineNumber":514,"sourceCode":"\t\t}\n\t} else {\n\t\tselected, errSelect = h.authManager.SelectAuthByKind(ctx, \"codex\", \"\", auth.AuthKindOAuth, opts)\n\t}\n\tif errSelect != nil && selection != nil {\n\t\tselection.End(\"selection_failed\")\n\t}\n\treturn selection, selected, errSelect\n}\n\nvar errBodyTooLarge = errors.New(\"Codex live request body too large\")\n\nfunc readBody(body io.Reader) ([]byte, error) {\n\tpayload, errRead := readLimitedBody(body)\n\tif errRead != nil {\n\t\tif errors.Is(errRead, errBodyTooLarge) {\n\t\t\treturn nil, errRead\n\t\t}\n\t\treturn nil, fmt.Errorf(\"failed to read Codex live request: %w\", errRead)\n\t}\n\treturn payload, nil\n}\n\nfunc readLimitedBody(body io.Reader) ([]byte, error) {\n\tif body == nil {\n\t\treturn nil, nil\n\t}\n\tpayload, errRead := io.ReadAll(io.LimitReader(body, maxBodySize+1))\n\tif errRead != nil {\n\t\treturn nil, errRead\n\t}\n\tif len(payload) > maxBodySize {\n\t\treturn nil, errBodyTooLarge\n\t}\n\treturn payload, nil\n}\n","sourceCodeStart":496,"sourceCodeEnd":532,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/client/codex/live/live.go#L496-L532","documentation":"Error \"failed to read Codex live request: %w\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/client/codex/live/live.go:514 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the request body is complete and within the size limit.","Check the wrapped error for truncated or aborted request bodies."],"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"}