Skip to content

Commit c1e26fc

Browse files
committed
refactor
1 parent 8c8c9e4 commit c1e26fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/edge_proxy/environments.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ async def _fetch_document(
173173
headers=headers,
174174
)
175175
if response.status_code == starlette.status.HTTP_304_NOT_MODIFIED:
176-
if not environment_document:
177-
# This is an API error and should never happen
178-
raise f"GET /environment-document returned 304 without a cached document. environment={key_pair.client_side_key}"
176+
assert environment_document, (
177+
f"GET /environment-document returned 304 without a cached document. environment={key_pair.client_side_key}"
178+
)
179179
return environment_document
180180
response.raise_for_status()
181181
return orjson.loads(response.text)

0 commit comments

Comments
 (0)