504
what this HTTP status codes error means
How it shows up
HTTP/1.1 504 Gateway Timeout
What it means
A server acting as a gateway or proxy did not get a response in time from the server behind it, so it gave up and returned 504.
The usual cause in an AI-built app
The app's API route waits on a slow step, often a call to an AI model or an outside API, and the hosting platform stops waiting before that step finishes.
Check this first
Check the response headers of the failing request for the host's own error code, such as x-vercel-error: FUNCTION_INVOCATION_TIMEOUT on Vercel.