Skip to content

Commit 0710b29

Browse files
committed
skip over chunks that result in 400 client error responses
1 parent 8d9739c commit 0710b29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/local_assignment_multi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,13 @@ def request_assignments(subscription_plan_uuid, chunk_id, emails_for_chunk, envi
243243
response.raise_for_status()
244244
except requests.exceptions.HTTPError:
245245
# if it's a 401, try refetching the JWT and re-try the request
246+
print(response.content)
246247
if response.status_code == 401:
247248
print('EXPIRED JWT, REFETCHING...')
248249
response = _post_assignments(subscription_plan_uuid, emails_for_chunk, environment, fetch_jwt)
249250
response.raise_for_status()
250251
else:
251-
raise
252+
print('Continuing past this exception.')
252253

253254
response_data = response.json()
254255

0 commit comments

Comments
 (0)