{"record":{"id":"d1f04532690124c3","repo":"router-for-me/CLIProxyAPI","slug":"err","errorCode":"ERR","errorMessage":"protocol error","messagePattern":"protocol error","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/api/redis_queue_protocol.go","lineNumber":419,"sourceCode":"\t\treturn 0, false, false\n\t}\n\tif len(args) == 2 {\n\t\treturn 1, false, true\n\t}\n\tparsed, errParse := strconv.Atoi(strings.TrimSpace(args[2]))\n\tif errParse != nil {\n\t\treturn 0, true, true\n\t}\n\treturn parsed, true, true\n}\n\nfunc readRESPArray(reader *bufio.Reader) ([]string, error) {\n\tprefix, errRead := reader.ReadByte()\n\tif errRead != nil {\n\t\treturn nil, errRead\n\t}\n\tif prefix != '*' {\n\t\treturn nil, fmt.Errorf(\"protocol error\")\n\t}\n\tline, errLine := readRESPLine(reader)\n\tif errLine != nil {\n\t\treturn nil, errLine\n\t}\n\tcount, errParse := strconv.Atoi(line)\n\tif errParse != nil || count < 0 {\n\t\treturn nil, fmt.Errorf(\"protocol error\")\n\t}\n\targs := make([]string, 0, count)\n\tfor i := 0; i < count; i++ {\n\t\tvalue, errString := readRESPString(reader)\n\t\tif errString != nil {\n\t\t\treturn nil, errString\n\t\t}\n\t\targs = append(args, value)\n\t}\n\treturn args, nil","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/api/redis_queue_protocol.go#L401-L437","documentation":"Error \"protocol error\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/api/redis_queue_protocol.go:419 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the client speaks the expected redis queue protocol version and message framing.","Check for corrupted or truncated messages on the queue connection and reconnect if needed."],"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"}