Errors
HTTP status codes and response shapes.
Response Shape
Most application errors return a JSON object with a detail field:
{
"detail": "function not found"
}Validation errors return FastAPI's validation detail array:
{
"detail": [
{
"loc": ["body", "name"],
"msg": "Field required",
"type": "missing"
}
]
}Status Codes
| Status | Common cause |
|---|---|
401 | Missing bearer token, expired user session, invalid API key, or disabled API key. |
404 | Project, function, workflow, version, or run was not found in the current workspace. |
409 | Attempted to trigger a target with no runnable current version or a disabled current version. |
422 | Invalid UUID, invalid query parameter, unknown JSON field, or invalid request body. |
500 | Unexpected infrastructure or database failure. |
Trigger Failures
SDK calls such as function.spawn(...), function.remote(...), workflow.spawn(...), and workflow.remote(...) create runs.
If submission to the execution infrastructure fails after the run row is created, the run is returned with:
{
"status": "failed",
"error": "Cloud Run submit failed: ..."
}Treat run status as the source of truth for execution outcome.

