webrtc: fix returning code 404 when a stream does not exist (#3369)
This commit is contained in:
@@ -90,7 +90,7 @@ func (pm *dummyPathManager) AddPublisher(_ defs.PathAddPublisherReq) (defs.Path,
|
||||
|
||||
func (pm *dummyPathManager) AddReader(req defs.PathAddReaderReq) (defs.Path, *stream.Stream, error) {
|
||||
if req.AccessRequest.Name == "nonexisting" {
|
||||
return nil, nil, &defs.PathNoOnePublishingError{}
|
||||
return nil, nil, defs.PathNoOnePublishingError{}
|
||||
}
|
||||
return pm.path, pm.path.stream, nil
|
||||
}
|
||||
|
||||
@@ -518,7 +518,7 @@ func (s *session) runRead() (int, error) {
|
||||
return http.StatusUnauthorized, err
|
||||
}
|
||||
|
||||
var terr2 *defs.PathNoOnePublishingError
|
||||
var terr2 defs.PathNoOnePublishingError
|
||||
if errors.As(err, &terr2) {
|
||||
return http.StatusNotFound, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user