{"record":{"id":"46f5182ac68f9da7","repo":"nextcloud/server","slug":"failed-to-load-tag","errorCode":null,"errorMessage":"Failed to load tag","messagePattern":"Failed to load tag","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/systemtags/src/services/api.ts","lineNumber":65,"sourceCode":"\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 })\n\t\tthrow new Error(t('systemtags', 'Failed to load tag'), { cause: error })\n\t}\n}\n\n/**\n * Get the last used tag IDs.\n */\nexport async function fetchLastUsedTagIds(): Promise<number[]> {\n\tconst url = generateUrl('/apps/systemtags/lastused')\n\ttry {\n\t\tconst { data: lastUsedTagIds } = await axios.get<string[]>(url)\n\t\treturn lastUsedTagIds.map(Number)\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to load last used tags'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to load last used tags'), { cause: error })\n\t}\n}\n\n/**","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/systemtags/src/services/api.ts#L47-L83","documentation":"Error \"Failed to load tag\" thrown in nextcloud/server.","triggerScenarios":"Thrown at apps/systemtags/src/services/api.ts:65 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"}