toeverything/AFFiNE · error · GraphqlBadRequest
caldav_disabled
caldav_disabled
Error message
GraphQL bad request, code: caldav_disabled, CalDAV integration is not enabled.
What it means
Raised by `linkCalDAVAccount` when the server's `calendar.caldav` configuration is absent or `enabled` is false — the CalDAV integration feature flag is off, so linking any CalDAV account is refused with the caldav_disabled GraphQL bad request, regardless of the supplied credentials.
Source
Thrown at packages/backend/server/src/plugins/calendar/service.ts:197
if (error instanceof CalendarProviderRequestError) {
await this.models.calendarAccount.updateStatus(
account.id,
'invalid',
error.message
);
}
throw error;
}
return account;
}
async linkCalDAVAccount(params: {
userId: string;
input: LinkCalDAVAccountInput;
}) {
const caldavConfig = this.config.calendar.caldav;
if (!caldavConfig?.enabled) {
throw new GraphqlBadRequest({
code: 'caldav_disabled',
message: 'CalDAV integration is not enabled.',
});
}
const preset = caldavConfig.providers.find(
provider => provider.id === params.input.providerPresetId
);
if (!preset) {
throw new GraphqlBadRequest({
code: 'caldav_provider_not_found',
message: 'CalDAV provider is not available.',
});
}
const provider = this.requireProvider(CalendarProviderName.CalDAV);
if (!('discoverAccount' in provider)) {
throw new GraphqlBadRequest({View on GitHub (pinned to 591f874dad)
Solutions
- Enable the CalDAV integration in the server configuration (caldav plugin flag) and restart the server.
- Self-host admins: set the CalDAV feature to enabled, then retry the operation.
- If your deployment does not support CalDAV, use a different calendar provider.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/backend/server/src/plugins/calendar/service.ts:197 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of toeverything/AFFiNE@591f874dad (2026-08-18).
Data as JSON: /api/errors/915e2f6038621163.
Report an issue: GitHub.