AlexxIT/go2rtc · error
wrong response on
Error message
wrong response on %s
What it means
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.
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/rtsp/client.go:140 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AlexxIT/go2rtc@c245815e75 (2026-09-07).
Data as JSON: /api/errors/4e0f96e53c74e851.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/rtsp/client.go:140
return c.Do(req)
case http.StatusUnauthorized:
switch c.auth.Method {
case tcp.AuthNone:
if c.auth.ReadNone(res) {
return c.Do(req)
}
return nil, errors.New("user/pass not provided")
case tcp.AuthUnknown:
if c.auth.Read(res) {
return c.Do(req)
}
default:
return nil, errors.New("wrong user/pass")
}
}
return res, fmt.Errorf("wrong response on %s", req.Method)
}
func (c *Conn) Options() error {
req := &tcp.Request{Method: MethodOptions, URL: c.URL}
res, err := c.Do(req)
if err != nil {
return err
}
if val := res.Header.Get("Content-Base"); val != "" {
c.URL, err = urlParse(val)
if err != nil {
return err
}
}
return nilView on GitHub (pinned to c245815e75)