Files
armaan4658 34b3a02224 service: return 412 for a WHIP trickle with an outdated entity-tag (#5300)
When a WHIP PATCH carries an If-Match that no longer matches the
publisher's ICE session, the RTC node returns psrpc.FailedPrecondition,
but iceTrickle had no case for that code and answered 500. RFC 9725
section 4.3.1 requires 412 Precondition Failed, which is also what
psrpc's own ErrorCode.ToHTTP maps FailedPrecondition to.

Also pass the error instead of nil to handleError in the non-psrpc
branches of iceTrickle and iceRestart. handleError calls err.Error(),
so a nil error would panic. The psrpc client wraps all of its own
failures today, so this is hardening.

Add a unit test for the PATCH status mapping and an integration test
that drives a real WHIP session through trickle and ICE restart.
2026-12-02 14:48:45 +08:00
..
2025-02-18 00:40:56 -08:00