{"record":{"id":"d80f66f59aed0c69","repo":"RocketChat/Rocket.Chat","slug":"failed-to-fetch-registration-intent-endpoint","errorCode":null,"errorMessage":"Failed to fetch registration intent endpoint","messagePattern":"Failed to fetch registration intent endpoint","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/lib/cloud/startRegisterWorkspaceSetupWizard.ts","lineNumber":42,"sourceCode":"\t\t\tignoreSsrfValidation: true,\n\t\t});\n\t\tif (!response.ok) {\n\t\t\tthrow new Error((await response.json()).error);\n\t\t}\n\n\t\tpayload = await response.json();\n\t} catch (err: any) {\n\t\tSystemLogger.error({\n\t\t\tmsg: 'Failed to register workspace intent with Rocket.Chat Cloud',\n\t\t\turl: '/api/v2/register/workspace',\n\t\t\terr,\n\t\t});\n\n\t\tthrow err;\n\t}\n\n\tif (!payload) {\n\t\tthrow new Error('Failed to fetch registration intent endpoint');\n\t}\n\n\treturn payload;\n}\n","sourceCodeStart":24,"sourceCodeEnd":47,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/cloud/startRegisterWorkspaceSetupWizard.ts#L24-L47","documentation":"After the intent POST, the code expects a parsed JSON payload; if payload is still falsy (an ok response with an empty or null body, or the assignment never happened), it throws the generic 'Failed to fetch registration intent endpoint'. The network call itself 'succeeded' — the response just had no usable body.","triggerScenarios":"Cloud answers 200/204 with an empty or null body; an intermediary strips or rewrites the response body; the endpoint moved and returns an empty response.","commonSituations":"Version skew between the Rocket.Chat server and the current cloud API; proxies that rewrite or recompress bodies; partial cloud incidents returning empty responses.","solutions":["Update the Rocket.Chat server so its cloud client matches the current cloud API.","Manually POST to Cloud_Url/api/v2/register/workspace/intent from the server and inspect the raw body and content-type.","Check proxies for body rewriting or compression issues.","Retry after cloud-side incidents are resolved."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const payload = await startRegisterWorkspaceSetupWizard(regInfo, resend);\n} catch (e) {\n  if (e instanceof Error && e.message === 'Failed to fetch registration intent endpoint') {\n    // 200-with-empty-body: probe the endpoint manually and check server/cloud version alignment\n  }\n  throw e;\n}","preventionTips":["Keep the Rocket.Chat server on a release aligned with the current cloud API.","Probe cloud endpoints with curl after proxy changes to confirm bodies arrive intact.","Treat 'ok but empty payload' responses as version-skew signals and escalate to updates, not retries."],"tags":["rocket-chat","cloud","registration","empty-response"],"backgroundTag":"cloud-registration-failed","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}