mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-14 21:15:06 +00:00
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:
@@ -20,7 +20,7 @@ def test_search_returns_results(http_session, server_url: str, service_case) ->
|
||||
)
|
||||
if r.status_code in (400, 401, 403):
|
||||
pytest.skip(f"{service} search not available: {r.status_code} {r.text[:200]}")
|
||||
if r.status_code == 502 and "not supported" in r.text.lower():
|
||||
if r.status_code == 422 and "not supported" in r.text.lower():
|
||||
pytest.skip(f"{service} does not implement search")
|
||||
assert r.status_code == 200, r.text
|
||||
body = r.json()
|
||||
|
||||
Reference in New Issue
Block a user