Browse Source

Add Vancouver to the location list even if the API fails

pull/172/head
Michael Olund 5 years ago
parent
commit
d993107f1a
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      edivorce/apps/core/utils/efiling_court_locations.py

+ 9
- 3
edivorce/apps/core/utils/efiling_court_locations.py View File

@ -74,6 +74,12 @@ class EFilingCourtLocations(EFilingHubCallerBase):
if response.status_code == 401: if response.status_code == 401:
print(response.headers.get('WWW-Authenticate', '')) print(response.headers.get('WWW-Authenticate', ''))
return {"Error calling court locations API": {"status_code": "401", "text": "authentication failed"}}
return {"Error calling court locations API": {"status_code": str(response.status_code), "text": response.text}}
return {
"Error calling court locations API": {"status_code": "401", "text": "authentication failed"},
"Vancouver": {"address_1": "API Error", "postal": "APIERR", "location_id": "6011"}
}
return {
"Error calling court locations API": {"status_code": str(response.status_code), "text": response.text},
"Vancouver": {"address_1": "API Error", "postal": "APIERR", "location_id": "6011"}
}

Loading…
Cancel
Save