rcpch / national-paediatric-diabetes-audit

A django application to audit the care of children and young people with diabetes in England and Wales.
0 stars 1 forks source link

Use our postcodes.io instance properly #354

Closed mbarton closed 2 weeks ago

mbarton commented 2 weeks ago

Follow up to #343 and #340.

Make our postcodes.io instance mandatory. You must update your .env file after this change.

Actually pass the postcodes.io API key! I didn't notice this stopped working because I was testing with the API key disabled in Azure APIM.

As we don't use a TaskGroup we must re-raise exceptions that occur within our async tasks. Because we already checked for ValidationError, this had the unfortunate effect of silently eating any errors that weren't HTTPError.

I noticed this because I tried to access response.status which doesn't exist (it's actually response.status_code). But I didn't see anything in the log.

Finally update dummy_sheet.csv as it has an invalid postcode. I've left the invalid one in dummy_sheet_invalid.csv for demo purposes.

mbarton commented 2 weeks ago

Seen on STAGING (merged by @mbarton 5 minutes and 25 seconds ago) Please check your changes!