RocketChat/Rocket.Chat · error · Meteor.Error
error-room-id-param-not-provided
error-room-id-param-not-provided
Error message
The required "rid" param is missing.
What it means
Thrown by GET chat.ignoreUser when the 'rid' query parameter is missing or whitespace-only. The route has no AJV query schema, so this manual trim+check at chat.ts:952 is the validation. The endpoint toggles per-user ignore in a specific room.
Source
Thrown at apps/meteor/server/api/v1/chat.ts:953
type: 'object',
properties: {
success: { type: 'boolean', enum: [true] },
},
required: ['success'],
additionalProperties: false,
}),
400: validateBadRequestErrorResponse,
401: validateUnauthorizedErrorResponse,
},
},
async function action() {
const { rid, userId } = this.queryParams;
let { ignore = true } = this.queryParams;
ignore = typeof ignore === 'string' ? /true|1/.test(ignore) : ignore;
if (!rid?.trim()) {
throw new Meteor.Error('error-room-id-param-not-provided', 'The required "rid" param is missing.');
}
if (!userId?.trim()) {
throw new Meteor.Error('error-user-id-param-not-provided', 'The required "userId" param is missing.');
}
await ignoreUser(this.userId, { rid, userId, ignore });
return API.v1.success();
},
)
.get(
'chat.getDeletedMessages',
{
authRequired: true,
query: isChatGetDeletedMessagesProps,
response: {
200: ajv.compile<{ messages: Pick<IMessage, '_id'>[]; count: number; offset: number; total: number }>({View on GitHub (pinned to f9d3ec372b)
Solutions
- Pass rid as a query param: chat.ignoreUser?rid=<roomId>&userId=<uid>&ignore=true.
- Note the 'ignore' value must be a string ('true'/'1' for truthy) on this GET endpoint.
- Confirm both rid and userId are populated before issuing the call.
Example fix
// before GET /api/v1/chat.ignoreUser?userId=abc&ignore=true // after GET /api/v1/chat.ignoreUser?rid=GENERAL&userId=abc&ignore=true
Defensive patterns
Strategy: validation
Validate before calling
function buildIgnoreUrl(rid: string, userId: string, ignore = true) {
if (!rid?.trim()) throw new Error('rid query param is required for chat.ignoreUser');
const u = new URL('/api/v1/chat.ignoreUser', location.origin);
u.searchParams.set('rid', rid);
u.searchParams.set('userId', userId);
u.searchParams.set('ignore', String(ignore));
return u;
} Type guard
const isIgnoreQuery = (q: unknown): q is { rid: string; userId: string } =>
typeof q === 'object' && q !== null &&
typeof (q as any).rid === 'string' && (q as any).rid.trim().length > 0; Try / catch
try {
await GET(ignoreUrl);
} catch (e) {
if ((e as any)?.error === 'error-room-id-param-not-provided') {
// rid missing — re-resolve from active room context
}
throw e;
} Prevention
- Use 'rid' (not 'roomId') for this GET endpoint.
- Pass 'ignore' as a string ('true'/'1') since GET cannot carry booleans.
- Resolve rid and userId together from the active room + member list.
When it happens
Trigger: GET /api/v1/chat.ignoreUser?userId=<uid>&ignore=true without rid; passing rid under 'roomId'; sending rid as an empty string.
Common situations: Confusing rid (room id) with roomId used by other chat.* endpoints; SDK wrapper that names the field differently; UI action invoked before the room context is loaded.
Related errors
- error-user-id-param-not-provided
- error-param-required
- error-lastUpdate-param-invalid
- error-roomId-param-not-provided
- error-searchText-param-not-provided
AI-assisted analysis of RocketChat/Rocket.Chat@f9d3ec372b (2026-08-12).
Data as JSON: /api/errors/11a63d0d82971f11.
Report an issue: GitHub.