ctrachte / SimpliFly

A single-page progressive web app to show flights for a certain origin, destination, and their prices
2 stars 1 forks source link

SkyScanner API Error Handling #20

Closed ctrachte closed 3 years ago

ctrachte commented 3 years ago

Handle all responses from API, including 404, 500, etc.

The application must fail gracefully, eg. nothing hard-broken, warning message, redirects etc.

MrRedBeard commented 3 years ago

Seeing

SkyScanner.js:28 GET https://skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/apiservices/browsedates/v1.0/US/USD/en-US/ZUN-sky/BLI-sky/2021-01-05?inboundpartialdate=2021-01-05 400 (Bad Request)

Location Zuni, New Mexico

ctrachte commented 3 years ago

Yes, currently our version of skyscanner (free) seems to only accept USA airport locations. We need to have this in the error handling.

MrRedBeard commented 3 years ago

@ctrachte lol New Mexico is in the US

ctrachte commented 3 years ago

Oh, I read that as "Mexico" my bad. We can create an issue card for this. I haven't gotten far into my next task.