{"record":{"id":"4e0f96e53c74e851","repo":"AlexxIT/go2rtc","slug":"wrong-response-on-s","errorCode":null,"errorMessage":"wrong response on %s","messagePattern":"wrong response on (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/rtsp/client.go","lineNumber":140,"sourceCode":"\t\treturn c.Do(req)\n\n\tcase http.StatusUnauthorized:\n\t\tswitch c.auth.Method {\n\t\tcase tcp.AuthNone:\n\t\t\tif c.auth.ReadNone(res) {\n\t\t\t\treturn c.Do(req)\n\t\t\t}\n\t\t\treturn nil, errors.New(\"user/pass not provided\")\n\t\tcase tcp.AuthUnknown:\n\t\t\tif c.auth.Read(res) {\n\t\t\t\treturn c.Do(req)\n\t\t\t}\n\t\tdefault:\n\t\t\treturn nil, errors.New(\"wrong user/pass\")\n\t\t}\n\t}\n\n\treturn res, fmt.Errorf(\"wrong response on %s\", req.Method)\n}\n\nfunc (c *Conn) Options() error {\n\treq := &tcp.Request{Method: MethodOptions, URL: c.URL}\n\n\tres, err := c.Do(req)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif val := res.Header.Get(\"Content-Base\"); val != \"\" {\n\t\tc.URL, err = urlParse(val)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/pkg/rtsp/client.go#L122-L158","documentation":"Do retried the RTSP request after handling auth challenges (401) but the server still returned an unexpected/unacceptable response, so the method's result cannot be trusted. Names the RTSP method (e.g. OPTIONS, DESCRIBE) that failed.","triggerScenarios":"Thrown at pkg/rtsp/client.go:140 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check server logs for why the method (OPTIONS/DESCRIBE/SETUP/PLAY) was rejected","Verify credentials if the server challenges auth","Confirm the URL and method combination is valid for this server"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}