{"record":{"id":"f75321a09ae30bce","repo":"RocketChat/Rocket.Chat","slug":"error-bio-size-exceeded-f75321","errorCode":"error-bio-size-exceeded","errorMessage":"Bio size exceeds ${MAX_BIO_LENGTH} characters","messagePattern":"Bio size exceeds (.+?) characters","errorType":"exception","errorClass":"Meteor.Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/meteor-methods/users/saveUserProfile.ts","lineNumber":96,"sourceCode":"\t\t) {\n\t\t\tthrow new Meteor.Error('error-could-not-save-identity', 'Could not save user identity', {\n\t\t\t\tmethod: 'saveUserProfile',\n\t\t\t});\n\t\t}\n\t}\n\n\tif (settings.statusType || settings.statusText != null) {\n\t\tawait setUserStatusMethod(user, settings.statusType as UserStatus, settings.statusText);\n\t}\n\n\tif (user && (settings.bio || settings.bio === '')) {\n\t\tif (typeof settings.bio !== 'string') {\n\t\t\tthrow new Meteor.Error('error-invalid-field', 'bio', {\n\t\t\t\tmethod: 'saveUserProfile',\n\t\t\t});\n\t\t}\n\t\tif (settings.bio.length > MAX_BIO_LENGTH) {\n\t\t\tthrow new Meteor.Error('error-bio-size-exceeded', `Bio size exceeds ${MAX_BIO_LENGTH} characters`, {\n\t\t\t\tmethod: 'saveUserProfile',\n\t\t\t});\n\t\t}\n\t\tawait Users.setBio(user._id, settings.bio.trim());\n\t}\n\n\tif (user && (settings.nickname || settings.nickname === '')) {\n\t\tif (typeof settings.nickname !== 'string') {\n\t\t\tthrow new Meteor.Error('error-invalid-field', 'nickname', {\n\t\t\t\tmethod: 'saveUserProfile',\n\t\t\t});\n\t\t}\n\t\tif (settings.nickname.length > MAX_NICKNAME_LENGTH) {\n\t\t\tthrow new Meteor.Error('error-nickname-size-exceeded', `Nickname size exceeds ${MAX_NICKNAME_LENGTH} characters`, {\n\t\t\t\tmethod: 'saveUserProfile',\n\t\t\t});\n\t\t}\n\t\tawait Users.setNickname(user._id, settings.nickname.trim());","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/meteor-methods/users/saveUserProfile.ts#L78-L114","documentation":"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.","triggerScenarios":"settings.bio.length > 260 in the saveUserProfile call - e.g. a long pasted 'about me' text submitted from a textarea without a maxLength attribute.","commonSituations":"Frontends missing a character counter; migrated/imported profile data longer than the limit; third-party clients with a different assumed limit.","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'"],"exampleFix":"// before\n<textarea value={bio} onChange={(e) => setBio(e.target.value)} />\n\n// after\n<textarea maxLength={260} value={bio} onChange={(e) => setBio(e.target.value)} />","handlingStrategy":"validation","validationCode":"const MAX_BIO_LENGTH = 260;\nif (typeof bio === 'string' && bio.length > MAX_BIO_LENGTH) {\n  throw new RangeError(`Bio exceeds ${MAX_BIO_LENGTH} characters`);\n}","typeGuard":null,"tryCatchPattern":"catch (err) {\n  if (err instanceof Meteor.Error && err.error === 'error-bio-size-exceeded') {\n    showFieldError('bio', 'Bio must be 260 characters or fewer');\n  }\n}","preventionTips":["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"],"tags":["meteor","validation","profile","bio"],"backgroundTag":"field-length-limit","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}