RocketChat/Rocket.Chat · error · MeteorError
error-not-allowed
error-not-allowed
Error message
WebDAV Integration Not Allowed
What it means
The uploadFileToWebdav method checks only Webdav_Integration_Enabled (unlike the preview method, upload is generic WebDAV and needs no Nextcloud URL). If that setting is false, the upload is refused before any file data is touched or converted.
Source
Thrown at apps/meteor/server/bridges/webdav/methods/uploadFileToWebdav.ts:33
interface ServerMethods {
uploadFileToWebdav(
accountId: IWebdavAccount['_id'],
fileData: string | Buffer | ArrayBuffer,
name: string,
): { success: boolean; message?: TranslationKey };
}
}
Meteor.methods<ServerMethods>({
async uploadFileToWebdav(accountId, fileData, name) {
if (!Meteor.userId()) {
throw new MeteorError('error-invalid-user', 'Invalid User', {
method: 'uploadFileToWebdav',
});
}
if (!settings.get('Webdav_Integration_Enabled')) {
throw new MeteorError('error-not-allowed', 'WebDAV Integration Not Allowed', {
method: 'uploadFileToWebdav',
});
}
try {
await uploadFileToWebdav(accountId, fileData instanceof ArrayBuffer ? Buffer.from(fileData) : fileData, name);
return { success: true };
} catch (err: any) {
if (typeof err === 'object' && err instanceof Error && err.name === 'error-invalid-account') {
throw new MeteorError(err.name, 'Invalid WebDAV Account', {
method: 'uploadFileToWebdav',
});
}
logger.error({ err });
if (err.response) {
const { status } = err.response;View on GitHub (pinned to b2c16d5842)
Solutions
- Enable Webdav_Integration_Enabled in Administration > WebDAV Integration
- Hide the upload-to-WebDAV affordance in the client when the setting is off, so users never reach the error
- Retry the upload after enabling
Defensive patterns
Strategy: validation
Validate before calling
// client: read the public setting before offering the action
const webdavEnabled = useSetting('Webdav_Integration_Enabled');
if (!webdavEnabled) {
return null; // do not render upload-to-WebDAV UI
} Try / catch
try {
await Meteor.callAsync('uploadFileToWebdav', accountId, fileBuffer, name);
} catch (e: any) {
if (e?.error === 'error-not-allowed') {
// inform user the integration was disabled by the admin
}
} Prevention
- Bind WebDAV UI visibility to the Webdav_Integration_Enabled setting reactively
- Treat error-not-allowed as permanent for this session: do not auto-retry
When it happens
Trigger: Admin disabled the WebDAV integration; setting toggled while a user had an upload dialog open; fresh install where the integration was never enabled.
Common situations: Feature switched off during maintenance; environment drift between staging (enabled) and production (disabled); UI not reacting to the setting change.
Related errors
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/e838345f531c116f.
Report an issue: GitHub.