{"record":{"id":"62bedc8d0507202d","repo":"siyuan-note/siyuan","slug":"caldav-calendar-path-is-invalid","errorCode":null,"errorMessage":"CalDAV: calendar path is invalid","messagePattern":"CalDAV: calendar path is invalid","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/caldav.go","lineNumber":82,"sourceCode":"\tcalendarSupportedComponentSet       = []string{\"VEVENT\", \"VTODO\"}\n\n\tdefaultCalendar = caldav.Calendar{\n\t\tPath:                  CalDavDefaultCalendarPath,\n\t\tName:                  CalDavDefaultCalendarName,\n\t\tDescription:           \"Default calendar\",\n\t\tMaxResourceSize:       calendarMaxResourceSize,\n\t\tSupportedComponentSet: calendarSupportedComponentSet,\n\t}\n\tcalendars = Calendars{\n\t\tloaded:            false,\n\t\tchanged:           false,\n\t\tlock:              sync.Mutex{},\n\t\tcalendars:         sync.Map{},\n\t\tcalendarsMetaData: []*caldav.Calendar{},\n\t}\n\n\tErrorCalDavCalendarNotFound    = errors.New(\"CalDAV: calendar not found\")\n\tErrorCalDavCalendarPathInvalid = errors.New(\"CalDAV: calendar path is invalid\")\n\n\tErrorCalDavCalendarObjectNotFound    = errors.New(\"CalDAV: calendar object not found\")\n\tErrorCalDavCalendarObjectPathInvalid = errors.New(\"CalDAV: calendar object path is invalid\")\n)\n\n// CalendarsMetaDataFilePath returns the absolute path of the calendars' meta data file\nfunc CalendarsMetaDataFilePath() string {\n\treturn DavPath2DirectoryPath(CalDavCalendarsMetaDataFilePath)\n}\n\nfunc GetCalDavPathDepth(urlPath string) CalDavPathDepth {\n\turlPath = PathCleanWithSlash(urlPath)\n\treturn CalDavPathDepth(len(strings.Split(urlPath, \"/\")) - 1)\n}\n\n// GetCardDavPathDepth parses\nfunc ParseCalendarObjectPath(objectPath string) (calendarPath string, objectID string, err error) {\n\tcalendarPath, objectFileName := path.Split(objectPath)","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/kernel/model/caldav.go#L64-L100","documentation":"CalDAV sentinel error ErrorCalDavCalendarPathInvalid: the request path's depth does not equal the calendar-collection depth expected by GetCalDavPathDepth. The URL addresses something other than a calendar (e.g. a deeper resource or the root), which the calendar lookup cannot handle.","triggerScenarios":"Thrown at kernel/model/caldav.go:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the CalDAV URL points at a calendar collection path","Adjust the client configuration to use the documented calendar path depth"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}