RocketChat/Rocket.Chat · error · Error
(await response.json()).error
Error message
(await response.json()).error
What it means
startRegisterWorkspaceSetupWizard POSTs the workspace registration intent to cloud /api/v2/register/workspace/intent. On a non-ok response it throws the 'error' field parsed from the cloud's JSON body — so the actual message you see is whatever validation the cloud performed (invalid email, invalid payload, rejected workspace data).
Source
Thrown at apps/meteor/server/lib/cloud/startRegisterWorkspaceSetupWizard.ts:27
export async function startRegisterWorkspaceSetupWizard(resend = false, email: string): Promise<CloudRegistrationIntentData> {
assertNotOfflineLicense();
const regInfo = await buildWorkspaceRegistrationData(email);
let payload;
try {
const cloudUrl = settings.get<string>('Cloud_Url');
const response = await fetch(`${cloudUrl}/api/v2/register/workspace/intent`, {
body: regInfo,
method: 'POST',
params: {
resent: resend,
},
// SECURITY: the URL is a default hardcoded value or an envvar/setting set by an admin. It's safe to disable this check.
ignoreSsrfValidation: true,
});
if (!response.ok) {
throw new Error((await response.json()).error);
}
payload = await response.json();
} catch (err: any) {
SystemLogger.error({
msg: 'Failed to register workspace intent with Rocket.Chat Cloud',
url: '/api/v2/register/workspace',
err,
});
throw err;
}
if (!payload) {
throw new Error('Failed to fetch registration intent endpoint');
}
return payload;View on GitHub (pinned to b2c16d5842)
Solutions
- Read the thrown message — it is the cloud's own validation error text naming the offending field.
- Set a valid Organization_Email (and Site_Name) in the Setup Wizard / admin settings and retry.
- Verify Cloud_Url and update the server to a supported release.
- Check the SystemLogger entry 'Failed to register workspace intent with Rocket.Chat Cloud' for full context.
Defensive patterns
Strategy: try-catch
Validate before calling
const email = settings.get<string>('Organization_Email') ?? '';
if (!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(email)) {
throw new Error('set a valid Organization_Email before registering with cloud');
} Try / catch
try {
const payload = await startRegisterWorkspaceSetupWizard(regInfo, resend);
} catch (e) {
if (e instanceof Error) {
// the thrown message is the cloud's own validation text — surface it next to the offending wizard field
}
throw e;
} Prevention
- Fill Organization_Email and Site_Name with valid values before the wizard's register step.
- Keep the server updated so the intent payload matches current cloud validation.
- Log the SystemLogger context entry whenever an intent fails to capture the request shape that was rejected.
When it happens
Trigger: The Setup Wizard registration step where the cloud rejects the intent payload: empty or malformed Organization_Email, invalid Site_Name/device registration info, or stricter cloud-side validation than this server version expects.
Common situations: Organization_Email never configured or with a bad format; older server talking to a newer cloud API; Cloud_Url pointing at the wrong environment; device registration info rejected by policy.
Related errors
- Failed to connect to Rocket.Chat Cloud: ${error}
- Invalid registration token
- Failed to fetch registration intent endpoint
- Failed to connect to Rocket.Chat Cloud: ${response.statusTex
- error-invalid-state
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/4983ee0252f2f9a4.
Report an issue: GitHub.