{"record":{"id":"9a5faaf7bbec36b0","repo":"nextcloud/server","slug":"failed-to-load-last-used-tags","errorCode":null,"errorMessage":"Failed to load last used tags","messagePattern":"Failed to load last used tags","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/systemtags/src/services/api.ts","lineNumber":79,"sourceCode":"\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/**\n * Create a tag and return the Id of the newly created tag.\n *\n * @param tag The tag to create\n */\nexport async function createTag(tag: Tag | ServerTag): Promise<number> {\n\tconst path = '/systemtags'\n\tconst tagToPost = formatTag(tag)\n\ttry {\n\t\tconst { headers } = await davClient.customRequest(path, {\n\t\t\tmethod: 'POST',\n\t\t\tdata: tagToPost,\n\t\t})\n\t\tconst contentLocation = headers.get('content-location')\n\t\tif (contentLocation) {","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/systemtags/src/services/api.ts#L61-L97","documentation":"Error \"Failed to load last used tags\" thrown in nextcloud/server.","triggerScenarios":"Thrown at apps/systemtags/src/services/api.ts:79 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"}