Open Nin3s opened 1 year ago
Just added weather to a new trip and currently working. will keep trying things to see when it stops
Just added weather to a new trip and currently working. will keep trying things to see when it stops
wait didn't it originally show the current forecast + the next 5 days 🤔
Not sure, but i just did a trip for Topeka Kansas and the weather widget doesn't work, i wonder if there's a patterns with the locations
Currently getting a 401 unauthorized error when accessing weather on deployment https://openweathermap.org/faq#error401
Works on localhost, but only on American destinations, when i use an international location the api returns 'No City found'
Works on localhost, but only on American destinations, when i use an international location the api returns 'No City found'
Is it possibly an issue with the google places api? Ik locations like london work if I put it in the weather api url directly, but rn it's taking in the trip destination as the parameter to search for
You're right it does work on london, I think the issue may be in how the trip destination is written.
So far, if it's a simple city, American State, Country(in American place's case) or city, Country(in London's case) it works, but if it's international like Sydney in Australia, (https://api.openweathermap.org/data/2.5/weather?q=Sydney NSW, Australia&appid=8958736f2360ef82e976ec83c5d1537d&units=imperial) it returns city not found
https://api.openweathermap.org/data/2.5/weather?q=Sydney NSW, Australia&appid=8958736f2360ef82e976ec83c5d1537d&units=imperial
vs
It looks like the space is what messes with the request(after q=)
Going to just remove the space from the link now that it works on production
Linked branch with this issue,
Now it checks if there is an error state and produces an error message. Also for international destinations, we take out the middle of the destination(Quebec, qc, Canada -> Quebec, Canada) in the api call for the weather. there is still a niche error with this when it comes to destinations that don't separate the first two words with a common(Sydney NSW, Australia) as the API does not recognize this, and simply taking out spaces would mess with other destinations such as Altamonte Springs, Fl, USA or would simply try and search or SydneyNSW. An idea to fix this would be to go by zip code but for now the widget will show the error message that the weather information could not be loaded to avoid crashing.
Linked branch with this issue,
Now it checks if there is an error state and produces an error message. Also for international destinations, we take out the middle of the destination(Quebec, qc, Canada -> Quebec, Canada) in the api call for the weather. there is still a niche error with this when it comes to destinations that don't separate the first two words with a common(Sydney NSW, Australia) as the API does not recognize this, and simply taking out spaces would mess with other destinations such as Altamonte Springs, Fl, USA or would simply try and search or SydneyNSW. An idea to fix this would be to go by zip code but for now the widget will show the error message that the weather information could not be loaded to avoid crashing.
there is a separate api link that lets us use the zipcode of the city, but we will have to convert the city into that which I'm not really sure I know how to do atm
“Application error: a client-side exception has occurred (see the browser console for more information).”
this also broke my trip so it will not load for me anymore as of rn :[