{"record":{"id":"d4c534a0b66106b9","repo":"actualbudget/actual","slug":"unhandled-field-typedkey","errorCode":null,"errorMessage":"Unhandled field: ${typedKey}","messagePattern":"Unhandled field: (.+?)","errorType":"exception","errorClass":"APIError","httpStatus":null,"severity":"error","filePath":"packages/loot-core/src/server/api.ts","lineNumber":1066,"sourceCode":"          conditionsUpdated = true;\n        } else {\n          throw APIError(`Ammount can not be found. There is a bug here`);\n        }\n        break;\n      }\n      case 'date': {\n        if (dateIndex !== -1) {\n          sched._conditions[dateIndex].value = value;\n          conditionsUpdated = true;\n        } else {\n          throw APIError(\n            `Date can not be found. Schedules can not be created without a date there is a bug here`,\n          );\n        }\n        break;\n      }\n      default: {\n        throw APIError(`Unhandled field: ${typedKey}`);\n      }\n    }\n  }\n\n  if (conditionsUpdated) {\n    return handlers['schedule/update']({\n      schedule: {\n        id: sched.id,\n        posts_transaction: sched.posts_transaction,\n        name: sched.name,\n      },\n      conditions: sched._conditions,\n      resetNextDate,\n    });\n  } else {\n    return sched.id;\n  }\n});","sourceCodeStart":1048,"sourceCodeEnd":1084,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/loot-core/src/server/api.ts#L1048-L1084","documentation":"The schedule update handler has an exhaustive switch over the fields keys; any key not explicitly handled falls into the default branch and throws this APIError. It means the caller passed a property the schedule update API does not support.","triggerScenarios":"Calling the schedule update API with an unrecognized key in the fields object — e.g. 'amount_operator', 'nextDate', 'id', or a field added in a newer API version than the installed code.","commonSituations":"Typos in field names ('ammount', 'payeeId'), camelCase vs snake_case mixups ('postsTransaction' instead of 'posts_transaction'), or SDK/doc version drift where a field exists upstream but not in the local build.","solutions":["Use only supported fields: name, posts_transaction, payee, account, amountOp, amount, date.","Fix field-name typos and casing to match the APIScheduleEntity keys.","Check the API reference for your installed Actual version; some fields may not exist yet."],"exampleFix":"// before\nawait updateSchedule(id, { postsTransaction: true });\n// after\nawait updateSchedule(id, { posts_transaction: true });","handlingStrategy":"validation","validationCode":"const ALLOWED = ['name','posts_transaction','payee','account','amountOp','amount','date'];\nconst bad = Object.keys(fields).filter(k => !ALLOWED.includes(k));\nif (bad.length) throw new Error(`Unsupported schedule fields: ${bad.join(', ')}`);","typeGuard":"function isScheduleUpdateField(k) {\n  return ['name','posts_transaction','payee','account','amountOp','amount','date'].includes(k);\n}","tryCatchPattern":"try {\n  await actual.updateSchedule(id, fields);\n} catch (e) {\n  if (String(e.message).startsWith('Unhandled field:')) {\n    console.error('Remove unsupported field:', e.message);\n  } else throw e;\n}","preventionTips":["Use snake_case names as defined in APIScheduleEntity","Copy field names from the typed API, not from memory","Check the API docs for your installed Actual version"],"tags":["api","validation","typo"],"backgroundTag":"unknown-api-field","analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}