Treat UME stream handshake 500 as a lost subscription.

Stop infinite reconnect loops when ZTE returns HTML 500 for a dead stream id and surface re-establish in the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-06 16:19:14 +08:00
parent c91d1571a2
commit db8c77a2e5
2 changed files with 8 additions and 0 deletions

View file

@ -24,8 +24,11 @@ _SUBSCRIPTION_MISSING_MARKERS: tuple[str, ...] = (
"status-reason: subscription not found",
"non-101 status: 503",
"non-101 status: 404",
"non-101 status: 500",
"handshake status 404",
"handshake status 503",
# ZTE UME often returns HTML 500 when the stream id is gone/invalid.
"handshake status 500",
)

View file

@ -753,6 +753,11 @@ class UmeAlarmNotificationTests(unittest.TestCase):
'ume_request_failed:DELETE ... 400:{"errorInfo":"subscription not exist!"}'
)
)
self.assertTrue(
is_ume_subscription_missing_error(
"Handshake status 500 Server Error -+-+- {'content-type': 'text/html'}"
)
)
def test_cancel_returns_needs_cleanup_when_ume_missing(self):
from time import time as _time