drizzlepac
drizzlepac copied to clipboard
STWCS: Add warning when astrometry database can't be reached
Issue HLA-1550 was created on JIRA by Steve Goldman:
When running drizzlepac and retrieving astrometric solutions from the astrometry database, there are two undesirable scenarios that aren't being captured or logged in the pipeline.
- The case where an exposure is not in the astrometry database
<xml>
<status>ERROR</status>
<msg>ipppssoot observation not found - check dataset ID</msg>
<data/>
</xml> ```
* When the astrometry database is not reachable (404 error)
The code to handle this is in STWCS in the updatewcs module. The warnings should probably be added as an else statement here:
<https://github.com/spacetelescope/stwcs/blob/1a81572377bb5b63e870f97b8bc8453cb4bf0f86/stwcs/updatewcs/astrometry_utils.py#L298>
Additionally, testing and ops would like the code to retry after a minute of failure. After that, an error should be raise. If possible, a configurable option where a warning or error is an option would be desired.