Use RequestResponse to report protocol handling errors (#3895)

* Send errors as necessary

* WIP

* WIP

* WIP

* WIP

* deps

* static check

* fix test

* test

* test

* logs
This commit is contained in:
Raja Subramanian
2025-09-04 11:27:07 +05:30
committed by GitHub
parent 98352fd0f9
commit 07c40cf349
16 changed files with 422 additions and 386 deletions
+5 -1
View File
@@ -53,7 +53,11 @@ func (s whipService) Create(ctx context.Context, req *rpc.WHIPCreateRequest) (*r
return nil, ErrParticipantNotFound
}
if err := lp.HandleOffer(webrtc.SessionDescription{Type: webrtc.SDPTypeOffer, SDP: req.OfferSdp}, 0); err != nil {
if err := lp.HandleOffer(&livekit.SessionDescription{
Type: webrtc.SDPTypeOffer.String(),
Sdp: req.OfferSdp,
Id: 0,
}); err != nil {
lp.GetLogger().Errorw("whip service: could not handle offer", err)
return nil, err
}