{"record":{"id":"0eaa1b738797b3de","repo":"actualbudget/actual","slug":"fileid-is-required","errorCode":null,"errorMessage":"fileId is required","messagePattern":"fileId is required","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"packages/sync-server/src/app-sync.ts","lineNumber":310,"sourceCode":"    }\n  }\n\n  res.send(OK_RESPONSE);\n});\n\napp.post('/upload-user-file', async (req, res) => {\n  if (typeof req.headers['x-actual-name'] !== 'string') {\n    // FIXME: Not sure how this cannot be a string when the header is\n    // set.\n    res.status(400).send('single x-actual-name is required');\n    return;\n  }\n\n  const name = decodeURIComponent(req.headers['x-actual-name']);\n  const fileId = req.headers['x-actual-file-id'];\n\n  if (!fileId || typeof fileId !== 'string') {\n    res.status(400).send('fileId is required');\n    return;\n  }\n  if (!isValidFileId(fileId)) {\n    res.status(400).send('invalid fileId');\n    return;\n  }\n\n  let groupId = req.headers['x-actual-group-id'] || null;\n  const encryptMeta = extractSingleHeader(req, res, 'x-actual-encrypt-meta');\n  if (res.headersSent) return;\n  const syncFormatVersion = extractSingleHeader(req, res, 'x-actual-format');\n  if (res.headersSent) return;\n\n  if (!!groupId && (typeof groupId !== 'string' || !isValidGroupId(groupId))) {\n    res.status(400).send('invalid groupId');\n    return;\n  }\n","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/sync-server/src/app-sync.ts#L292-L328","documentation":"Error \"fileId is required\" thrown in actualbudget/actual.","triggerScenarios":"Thrown at packages/sync-server/src/app-sync.ts:310 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":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}