Request failed with status code 502

Hi Y’all

I’m getting a bizarre issue with api calls.

I’m using React and Next Js, and using next js built in api routing
On my local machine when i submit a form (which in turn pushes data to the api/submitmyform which in turn calls a couple of external apis) it works fine, but i’ve deployed it to netlify and when i submit the form now i’m getting 502 when it tries to connect to each 3rd party url in my api call

Am i missing something basic?

Thanks

Matt

Hey there, @dzined :wave:

Welcome to the Netlify Forums! Have you searched for relevant threads about 502s? You can do so using this link: Search results for '502 error' - Netlify Support Forums

Two things that may be particularly helpful starting with are:

If you’re still stuck after this, please let us know! It would also be beneficial to share a URL to your site, your most recent deploy log as the logs have lots of helpful information, and a link to your project repo if possible.