Closed JanC closed 6 years ago
strange, it's not happening anymore
Either way, I added a check in https://github.com/flyinactor91/AVWX-API/commit/e45b6fcd266d5692c4b1a87173d72987e6c4ec7c for avwx.exceptions.BadStation
which is what the avwx library raises when the station info is unavailable. Not sure why it flipped, but a good try/except block anyway.
When a metar report is looked up with the
info
option by coordinates in the geonames API but the found station does not exist on the AVWX-Engine, the API returns aHTTP 500
Request with the
info
optionSame request without the
info
option:In this case, I would give priority to the metar report and return an empty
Info
json.https://github.com/flyinactor91/AVWX-API/blob/bed76e4960d46420d2fdcfe424fa814182c2760c/avwx_api/handling.py#L133-L135