RocketChat/Rocket.Chat · error · Meteor.Error
error-bio-size-exceeded
error-bio-size-exceeded
Error message
Bio size exceeds ${MAX_BIO_LENGTH} characters What it means
saveUserProfile enforces a hard bio length limit: MAX_BIO_LENGTH = 260 characters (apps/meteor/server/meteor-methods/users/saveUserProfile.ts:23). Any bio longer than 260 characters is rejected before Users.setBio runs.
Source
Thrown at apps/meteor/server/meteor-methods/users/saveUserProfile.ts:96
) {
throw new Meteor.Error('error-could-not-save-identity', 'Could not save user identity', {
method: 'saveUserProfile',
});
}
}
if (settings.statusType || settings.statusText != null) {
await setUserStatusMethod(user, settings.statusType as UserStatus, settings.statusText);
}
if (user && (settings.bio || settings.bio === '')) {
if (typeof settings.bio !== 'string') {
throw new Meteor.Error('error-invalid-field', 'bio', {
method: 'saveUserProfile',
});
}
if (settings.bio.length > MAX_BIO_LENGTH) {
throw new Meteor.Error('error-bio-size-exceeded', `Bio size exceeds ${MAX_BIO_LENGTH} characters`, {
method: 'saveUserProfile',
});
}
await Users.setBio(user._id, settings.bio.trim());
}
if (user && (settings.nickname || settings.nickname === '')) {
if (typeof settings.nickname !== 'string') {
throw new Meteor.Error('error-invalid-field', 'nickname', {
method: 'saveUserProfile',
});
}
if (settings.nickname.length > MAX_NICKNAME_LENGTH) {
throw new Meteor.Error('error-nickname-size-exceeded', `Nickname size exceeds ${MAX_NICKNAME_LENGTH} characters`, {
method: 'saveUserProfile',
});
}
await Users.setNickname(user._id, settings.nickname.trim());View on GitHub (pinned to b2c16d5842)
Solutions
- Add maxLength={260} plus a live character counter to the bio textarea
- Validate length client-side before submit and block (not silently truncate) oversized text
- Catch error-bio-size-exceeded and show 'Bio must be 260 characters or fewer'
Example fix
// before
<textarea value={bio} onChange={(e) => setBio(e.target.value)} />
// after
<textarea maxLength={260} value={bio} onChange={(e) => setBio(e.target.value)} /> Defensive patterns
Strategy: validation
Validate before calling
const MAX_BIO_LENGTH = 260;
if (typeof bio === 'string' && bio.length > MAX_BIO_LENGTH) {
throw new RangeError(`Bio exceeds ${MAX_BIO_LENGTH} characters`);
} Try / catch
catch (err) {
if (err instanceof Meteor.Error && err.error === 'error-bio-size-exceeded') {
showFieldError('bio', 'Bio must be 260 characters or fewer');
}
} Prevention
- Set maxLength=260 on the bio textarea plus a live counter
- Block submit when over the limit instead of truncating silently
- Pin the limit constant in a shared package so client and server cannot drift
When it happens
Trigger: settings.bio.length > 260 in the saveUserProfile call - e.g. a long pasted 'about me' text submitted from a textarea without a maxLength attribute.
Common situations: Frontends missing a character counter; migrated/imported profile data longer than the limit; third-party clients with a different assumed limit.
Related errors
- error-bio-size-exceeded
- error-invalid-field
- error-nickname-size-exceeded
- duplicated-account
- error-invalid-account
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/f75321a09ae30bce.
Report an issue: GitHub.