Skip to content

Commit cc6e742

Browse files
committed
Add headers to fdv1 polling implementation
1 parent 203a033 commit cc6e742

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ldclient/impl/datasourcev2/polling.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,13 +445,13 @@ def fetch(self, selector: Optional[Selector]) -> PollingResult:
445445
retries=1,
446446
)
447447

448+
headers = response.headers
448449
if response.status >= 400:
449450
return _Fail(
450-
f"HTTP error {response}", UnsuccessfulResponseException(response.status)
451+
f"HTTP error {response}", UnsuccessfulResponseException(response.status),
452+
headers=headers
451453
)
452454

453-
headers = response.headers
454-
455455
if response.status == 304:
456456
return _Success(value=(ChangeSetBuilder.no_changes(), headers))
457457

@@ -475,6 +475,7 @@ def fetch(self, selector: Optional[Selector]) -> PollingResult:
475475
return _Fail(
476476
error=changeset_result.error,
477477
exception=changeset_result.exception,
478+
headers=headers,
478479
)
479480

480481

0 commit comments

Comments
 (0)