502 Error - Is it just an api timeout issue?

Hi team,

Full transparency, I’ve been following along with Phil Hawkswort’s JAMstack Course on Youtube (here: JAMstack Course - Build websites that are simpler, faster, and more secure - YouTube). It’s awesome! and I figured he knows Netlify because he works there. :slight_smile:

Anyway, I’m on the final part where we handle client-side rendering targeted API. I keep getting this:
Failed to load resource: the server responded with a status of 502 ()

Here is my instance: https://jolly-volhard-8ac3b5.netlify.app/

He has a github link in the video but let me know if I can provide something specific.

Here are error details:
{“errorType”:“Error”,“errorMessage”:“Request failed with status code 401”,“trace”:[“Error: Request failed with status code 401”," at createError (/var/task/node_modules/axios/lib/core/createError.js:16:15)“,” at settle (/var/task/node_modules/axios/lib/core/settle.js:17:12)“,” at IncomingMessage.handleStreamEnd (/var/task/node_modules/axios/lib/adapters/http.js:236:11)“,” at IncomingMessage.emit (events.js:323:22)“,” at endReadableNT (_stream_readable.js:1204:12)“,” at processTicksAndRejections (internal/process/task_queues.js:84:21)"]}

Hi Thomas and welcome to our community! Also, sorry to be slow to get back to you!

I don’t think any of your 502’s was a timeout - they all returned really fast when I look them up in our internal logs. I can’t say what you changed, but I see the same URL you were using to test (https://jolly-volhard-8ac3b5.netlify.app/.netlify/functions/weatherapi?lat=27.4917104&lon=-82.36880459999999&units=metric) as working now across all 60+ of our CDN nodes (all returned an HTTP 200 status when I scanned just now),

Did you make some updates in the meantime?