fix(api)!: send service and DRM errors as 422, not 502

Cloudflare replaces an origin 502 body with its own page, so clients got "502: Bad gateway" in place of the error and resent each failed licence.

BREAKING CHANGE: SERVICE_ERROR and DRM_ERROR now return HTTP 422 instead of 502.
This commit is contained in:
imSp4rky
2026-10-21 11:43:33 -06:00
parent e5c339934c
commit 39ec591c48
7 changed files with 30 additions and 45 deletions
+1 -1
View File
@@ -5123,7 +5123,7 @@ def handle_proxy_license(
)
# A service raises when the upstream licence server rejects the challenge.
# Surface it as a structured licence error, not an uncaught 500 the edge turns into a 502.
# Surface it as a structured licence error, not an uncaught 500.
try:
if drm_type == "widevine" and certificate:
license_blob = service.get_widevine_service_certificate(