{"record":{"id":"982f240eebd20768","repo":"twentyhq/twenty","slug":"caller-failed-response-contained-no-data","errorCode":null,"errorMessage":"${caller}() failed: response contained no data.","messagePattern":"(.+?)\\(\\) failed: response contained no data\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/twenty-sdk/src/sdk/logic-function/utils/post-graphql-request.util.ts","lineNumber":52,"sourceCode":"  if (!response.ok) {\n    throw new Error(\n      `${caller}() failed: HTTP ${response.status} ${response.statusText}`,\n    );\n  }\n\n  const body = (await response.json()) as {\n    data?: TData;\n    errors?: { message: string }[];\n  };\n\n  if (body.errors && body.errors.length > 0) {\n    throw new Error(\n      `${caller}() failed: ${body.errors.map((error) => error.message).join(', ')}`,\n    );\n  }\n\n  if (!body.data) {\n    throw new Error(`${caller}() failed: response contained no data.`);\n  }\n\n  return body.data;\n};\n","sourceCodeStart":34,"sourceCodeEnd":57,"githubUrl":"https://github.com/twentyhq/twenty/blob/1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6/packages/twenty-sdk/src/sdk/logic-function/utils/post-graphql-request.util.ts#L34-L57","documentation":"Thrown by postGraphqlRequest when the HTTP response is 200 OK, there are no GraphQL errors in the body, but the body.data field is falsy (null or undefined). This is a protocol-level anomaly — a successful GraphQL response should always contain data. Its absence suggests a server bug, an unexpected response format, or a proxy that stripped the data field.","triggerScenarios":"The metadata endpoint returns a 200 response with a body that has no errors array but also no data field. This can happen if the server returns an empty body, a malformed JSON response, or a response where data is explicitly null without a corresponding errors array (which violates the GraphQL spec).","commonSituations":"A reverse proxy or API gateway strips or rewrites the response body. The Twenty server has a bug returning a malformed response. A network middleware corrupts the response. The server returned a 200 with an empty or non-JSON body that was coerced. This is rare and usually indicates a server-side or infrastructure issue.","solutions":["Retry the request — if intermittent, it may be a transient server or proxy issue.","Log the full response body to inspect what the server actually returned.","Check if a proxy, load balancer, or API gateway is modifying the response.","Report to the Twenty platform team if the issue persists — this likely indicates a server bug.","Verify the Twenty server version is up-to-date and compatible with the SDK version."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"const requestWithData = async <T>(\n  params: { query: string; variables: unknown; caller: string },\n  retries = 2,\n): Promise<T> => {\n  for (let attempt = 0; attempt <= retries; attempt++) {\n    try {\n      return await postGraphqlRequest(params);\n    } catch (error) {\n      if (error instanceof Error && error.message.includes('no data') && attempt < retries) {\n        await new Promise((r) => setTimeout(r, 500 * (attempt + 1)));\n        continue;\n      }\n      throw error;\n    }\n  }\n  throw new Error('unreachable');\n};","preventionTips":["Log the full response body when this error occurs to diagnose server/proxy issues.","Implement retry with backoff for this anomalous response.","Report persistent occurrences to the Twenty platform team — it indicates a server bug.","Verify no intermediary proxy strips the data field from GraphQL responses."],"tags":["sdk","graphql","protocol-error","server-bug"],"backgroundTag":null,"analyzedSha":"1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6","analyzedAt":"2026-08-12T15:37:27.593Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}