{"record":{"id":"d09ba19f20884588","repo":"nextcloud/server","slug":"failed-to-load-tags","errorCode":null,"errorMessage":"Failed to load tags","messagePattern":"Failed to load tags","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/systemtags/src/services/api.ts","lineNumber":46,"sourceCode":"\t\t<nc:color />\n\t</d:prop>\n</d:propfind>`\n\n/**\n * Fetch all tags.\n */\nexport async function fetchTags(): Promise<TagWithId[]> {\n\tconst path = '/systemtags'\n\ttry {\n\t\tconst { data: tags } = await davClient.getDirectoryContents(path, {\n\t\t\tdata: fetchTagsPayload,\n\t\t\tdetails: true,\n\t\t\tglob: '/systemtags/*', // Filter out first empty tag\n\t\t}) as ResponseDataDetailed<Required<FileStat>[]>\n\t\treturn parseTags(tags)\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to load tags'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to load tags'), { cause: error })\n\t}\n}\n\n/**\n * Fetch a single tag by its ID.\n *\n * @param tagId - The ID of the tag to fetch\n */\nexport async function fetchTag(tagId: number): Promise<TagWithId> {\n\tconst path = '/systemtags/' + tagId\n\ttry {\n\t\tconst { data: tag } = await davClient.stat(path, {\n\t\t\tdata: fetchTagsPayload,\n\t\t\tdetails: true,\n\t\t}) as ResponseDataDetailed<Required<FileStat>>\n\t\treturn parseTags([tag])[0]!\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to load tag'), { error })","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/systemtags/src/services/api.ts#L28-L64","documentation":"Error \"Failed to load tags\" thrown in nextcloud/server.","triggerScenarios":"Thrown at apps/systemtags/src/services/api.ts:46 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}