actualbudget/actual · error · APIError
Unhandled field: ${typedKey}
Error message
Unhandled field: ${typedKey} What it means
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.
Source
Thrown at packages/loot-core/src/server/api.ts:1066
conditionsUpdated = true;
} else {
throw APIError(`Ammount can not be found. There is a bug here`);
}
break;
}
case 'date': {
if (dateIndex !== -1) {
sched._conditions[dateIndex].value = value;
conditionsUpdated = true;
} else {
throw APIError(
`Date can not be found. Schedules can not be created without a date there is a bug here`,
);
}
break;
}
default: {
throw APIError(`Unhandled field: ${typedKey}`);
}
}
}
if (conditionsUpdated) {
return handlers['schedule/update']({
schedule: {
id: sched.id,
posts_transaction: sched.posts_transaction,
name: sched.name,
},
conditions: sched._conditions,
resetNextDate,
});
} else {
return sched.id;
}
});View on GitHub (pinned to d4334cb6e6)
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.
Example fix
// before
await updateSchedule(id, { postsTransaction: true });
// after
await updateSchedule(id, { posts_transaction: true }); Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED = ['name','posts_transaction','payee','account','amountOp','amount','date'];
const bad = Object.keys(fields).filter(k => !ALLOWED.includes(k));
if (bad.length) throw new Error(`Unsupported schedule fields: ${bad.join(', ')}`); Type guard
function isScheduleUpdateField(k) {
return ['name','posts_transaction','payee','account','amountOp','amount','date'].includes(k);
} Try / catch
try {
await actual.updateSchedule(id, fields);
} catch (e) {
if (String(e.message).startsWith('Unhandled field:')) {
console.error('Remove unsupported field:', e.message);
} else throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Unknown payee name normalization: ${String(normalization)}
- `date` is required when adding a transaction
- Amount is invalid, must be an integer: ${trans.amount}
- There is already a filter named ${item.name}
- Filter name is required
AI-assisted analysis of actualbudget/actual@d4334cb6e6 (2026-08-29).
Data as JSON: /api/errors/d4c534a0b66106b9.
Report an issue: GitHub.