Record playback error messages
Record distinguishes Shaka runtime failures from playback service errors in src/features/Player/usePlayerErrorHandling.tsx.
Runtime HTTP failures
A Shaka BAD_HTTP_STATUS error (1001) with HTTP 403 does not establish a geographic restriction. Shaka reports the HTTP status in data[1]; it does not classify the reason for the refusal. See the Shaka error contract and HTTP 403 definition.
The viewer still receives a localized playback message:
| Runtime severity | Visible behavior |
|---|---|
| Critical | Terminal playback error screen with the playback error title and description. |
| Recoverable | Playback error dialog with Retry and Close; Retry uses the existing playback retry counter. |
For an unqualified Shaka network error, the description uses the WEB1000 dictionary message when available. Otherwise, it falls back to page_player_playback_shaka_error_1. The existing display formatter appends (WEB1000). Neither path substitutes the geographic restriction title or icon. Raw response bodies and signed resource URLs are not used as the display message.
This distinction is intentional in RECORD-4605. It preserves a visible fallback while avoiding an unsupported geographic diagnosis. It does not introduce retries, session renewal, new localization keys or a different severity policy.
Playback service errors
An explicit backend WEB1001 still uses the geographic restriction title, description and icon through handlePlaybackError. The existing initialization handling of an HTTP 403 without a structured backend error code is also unchanged; this PR only removes the separate Shaka runtime inference. This legacy initialization fallback is not evidence that arbitrary CDN failures are geographic restrictions.
Verification
src/features/Player/__tests__/runtimePlaybackErrorMessages.test.tsx exercises the actual error hook, message selection, severity classification, normalization and display formatting. Localization data, player instances, dialogs and telemetry I/O are stubbed.
- Deliver a Shaka network error with
code: 1001,data[1]: 403and critical severity. Verify the playback title and a nonempty description without the geographic restriction icon. - Repeat with recoverable severity. Verify the visible message, Retry and Close; selecting Retry must use the existing retry behavior.
- Repeat both cases with and without a
WEB1000dictionary translation to verify the code message and network fallback. - Deliver an explicit backend
WEB1001through playback initialization. Verify the geographic restriction title, description and icon remain present. - During release validation with the real provider, inspect the sanitized New Relic attributes
playbackErrorHttpStatus,playbackErrorRequestTypeandplaybackErrorResourceHost. They provide diagnostic context without signed URLs or response bodies.