mirror of
https://github.com/aler9/gortsplib
synced 2025-11-01 19:12:37 +08:00
export most client errors
This commit is contained in:
@@ -43,7 +43,7 @@ func (c *ClientConn) Announce(u *base.URL, tracks Tracks) (*base.Response, error
|
||||
}
|
||||
|
||||
if res.StatusCode != base.StatusOK {
|
||||
return nil, fmt.Errorf("bad status code: %d (%s)", res.StatusCode, res.StatusMessage)
|
||||
return nil, ErrClientWrongStatusCode{res.StatusCode, res.StatusMessage}
|
||||
}
|
||||
|
||||
c.streamURL = u
|
||||
@@ -71,7 +71,7 @@ func (c *ClientConn) Record() (*base.Response, error) {
|
||||
}
|
||||
|
||||
if res.StatusCode != base.StatusOK {
|
||||
return nil, fmt.Errorf("bad status code: %d (%s)", res.StatusCode, res.StatusMessage)
|
||||
return nil, ErrClientWrongStatusCode{res.StatusCode, res.StatusMessage}
|
||||
}
|
||||
|
||||
c.state = clientConnStateRecord
|
||||
|
Reference in New Issue
Block a user