NextJS site builds locally but graphql endpoint gets 502 error and build fails in Netlify

When running netlify build or npm run build locally the site builds fine no problems at all.

When using a web hook, triggering a build via UI or merging code the build fails with 502 error from the endpoint. This is only happening in the Netlify environment.

The site name is tagnext

Here is a build log → Netlify

Let me know if I can provide any additional info.

Thanks

@nickcodes You won’t be able to receive any community support as your build log is currently private.

It may be intentional, but I believe only Netlify’s staff could look at it currently.

I actually can’t see your build log either. Can you share your site id?

Here is the site id → 5856d6a6-5be4-45e1-8d4b-540249ba58ba
I am also getting 504 as well

502s and 504s are server-side errors. Have you tried contacting the API you’re trying to use? They control their servers and would be able to tell you why they responded with a 5xx status.