Skip to content

Fix AttributeError masking ERDDAP no-data error guidance - #238

Closed
shubham-x06 wants to merge 1 commit into
ioos:mainfrom
shubham-x06:fix/erddap-no-datasets-error-message
Closed

shubham-x06 wants to merge 1 commit into
ioos:mainfrom
shubham-x06:fix/erddap-no-datasets-error-message

Conversation

@shubham-x06

Copy link
Copy Markdown

When no glider datasets match the query constraints, the error handler crashed with AttributeError before the friendly guidance could be attached.

@shubham-x06

Copy link
Copy Markdown
Author

cc @ocefpaf @callumrollo @LindsayRAbrams quick one-line fix PR: when no glider datasets match the query constraints the error handler crashed with AttributeError before the friendly guidance could be attached, please review when convenient.

@shubham-x06

Copy link
Copy Markdown
Author

Verified locally: with the one-line fix the real HTTPError is re-raised with the friendly guidance appended, and all 8 tests pass.

Suggested follow-up fixes while in the area:

  1. query() bounding-box defaults still use truthiness checks (min_lat = min_lat or -90.0), so explicit 0 values are silently replaced by defaults.
  2. Add a regression test for the no-data error path (no network needed to cover the AttributeError).
  3. Fix stale return annotations in gliderpy/init.py (_deployment_lat/_deployment_lon say dict, return float; summary says DataFrame, returns Series).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants