{"record":{"id":"bc27ad608ef95c82","repo":"AlexxIT/go2rtc","slug":"unsupported-method-s","errorCode":null,"errorMessage":"unsupported method: %s","messagePattern":"unsupported method: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/rtsp/server.go","lineNumber":217,"sourceCode":"\t\t\t\t\tif track.Media.ID != MethodSetup {\n\t\t\t\t\t\ttrack.Close()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tres := &tcp.Response{Request: req}\n\t\t\terr = c.WriteResponse(res)\n\t\t\tc.playOK = true\n\t\t\treturn err\n\n\t\tcase MethodTeardown:\n\t\t\tres := &tcp.Response{Request: req}\n\t\t\t_ = c.WriteResponse(res)\n\t\t\tc.state = StateNone\n\t\t\treturn c.conn.Close()\n\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unsupported method: %s\", req.Method)\n\t\t}\n\t}\n}\n\nfunc reqTrackID(req *tcp.Request) int {\n\tvar s string\n\tif req.URL.RawQuery != \"\" {\n\t\ts = req.URL.RawQuery\n\t} else {\n\t\ts = req.URL.Path\n\t}\n\tif i := strings.LastIndexByte(s, '='); i > 0 {\n\t\tif i, err := strconv.Atoi(s[i+1:]); err == nil {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn -1\n}","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/pkg/rtsp/server.go#L199-L235","documentation":"The RTSP server received a request whose method is not implemented by the Accept switch (outside OPTIONS/DESCRIBE/SETUP/PLAY/PAUSE/TEARDOWN etc.), so the session returns an error response. Names the unsupported method.","triggerScenarios":"Thrown at pkg/rtsp/server.go:217 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the RTSP client issues only standard methods supported by the server","Update the server to handle the missing method if it is a valid RTSP extension"],"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"}