{"record":{"id":"915e2f6038621163","repo":"toeverything/AFFiNE","slug":"caldav-disabled","errorCode":"caldav_disabled","errorMessage":"GraphQL bad request, code: caldav_disabled, CalDAV integration is not enabled.","messagePattern":"GraphQL bad request, code: caldav_disabled, CalDAV integration is not enabled\\.","errorType":"exception","errorClass":"GraphqlBadRequest","httpStatus":400,"severity":"error","filePath":"packages/backend/server/src/plugins/calendar/service.ts","lineNumber":197,"sourceCode":"      if (error instanceof CalendarProviderRequestError) {\n        await this.models.calendarAccount.updateStatus(\n          account.id,\n          'invalid',\n          error.message\n        );\n      }\n      throw error;\n    }\n    return account;\n  }\n\n  async linkCalDAVAccount(params: {\n    userId: string;\n    input: LinkCalDAVAccountInput;\n  }) {\n    const caldavConfig = this.config.calendar.caldav;\n    if (!caldavConfig?.enabled) {\n      throw new GraphqlBadRequest({\n        code: 'caldav_disabled',\n        message: 'CalDAV integration is not enabled.',\n      });\n    }\n\n    const preset = caldavConfig.providers.find(\n      provider => provider.id === params.input.providerPresetId\n    );\n    if (!preset) {\n      throw new GraphqlBadRequest({\n        code: 'caldav_provider_not_found',\n        message: 'CalDAV provider is not available.',\n      });\n    }\n\n    const provider = this.requireProvider(CalendarProviderName.CalDAV);\n    if (!('discoverAccount' in provider)) {\n      throw new GraphqlBadRequest({","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/591f874dad30887a80143a061a44bd3ca7ee3299/packages/backend/server/src/plugins/calendar/service.ts#L179-L215","documentation":"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.","triggerScenarios":"Thrown at packages/backend/server/src/plugins/calendar/service.ts:197 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"591f874dad30887a80143a061a44bd3ca7ee3299","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}