hcengineering/platform · error
process:error:MethodNotFound
process:error:MethodNotFound
Error message
Method not found: {methodId} What it means
The process service could not resolve the hard-coded UpdateCard method in the client model: findObject(process.method.UpdateCard) returned undefined. This means the workspace model does not contain the UpdateCard method class required to apply user results to the execution card. It is thrown because executing a result set without that method would silently skip card updates.
Source
Thrown at services/process/src/main.ts:260
await control.client.tx(tx)
clearTimeout(timeout)
}
if (res.rollback != null) {
execution.rollback = execution.rollback.length > 30 ? execution.rollback.slice(-30) : execution.rollback
await control.client.update(execution, { rollback: execution.rollback })
}
}
}
async function executeResultSet (
control: ProcessControl,
results: UserResult[],
execution: Execution
): Promise<ExecuteResult> {
try {
const method = control.client.getModel().findObject(process.method.UpdateCard)
if (method === undefined) {
throw processError(process.error.MethodNotFound, { methodId: process.method.UpdateCard }, {}, true)
}
const impl = control.client.getHierarchy().as(method, serverProcess.mixin.MethodImpl) as MethodImpl<any>
if (impl === undefined) {
throw processError(process.error.MethodNotFound, { methodId: process.method.UpdateCard }, {}, true)
}
const params = {}
for (const res of results) {
if (res.key == null) continue
;(params as any)[res.key] = execution.context[res._id]
}
if (!control.cache.has(execution.card)) {
const card = await control.client.findOne(cardPlugin.class.Card, { _id: execution.card })
if (card !== undefined) {
control.cache.set(execution.card, card)
}
}
const f = await getResource(impl.func)
const res = await f(params, execution, control, undefined)View on GitHub (pinned to 63e28dc964)
Solutions
- Verify process.method.UpdateCard exists in the workspace model via control.client.getModel().findObject.
- Re-run model migrations / upgrade the process service and model to matching versions.
- Check that the process.method.UpdateCard constant matches the actual class id in the model definitions.
- If the method was intentionally removed, replace the hard-coded UpdateCard lookup with a configured or optional method id.
Example fix
// before
const method = control.client.getModel().findObject(process.method.UpdateCard)
if (method === undefined) {
throw processError(process.error.MethodNotFound, { methodId: process.method.UpdateCard }, {}, true)
}
// after
const method = control.client.getModel().findObject(process.method.UpdateCard)
if (method === undefined) {
console.error('UpdateCard method missing from model; run model upgrade', { methodId: process.method.UpdateCard })
throw processError(process.error.MethodNotFound, { methodId: process.method.UpdateCard }, {}, true)
} Defensive patterns
Strategy: validation
Validate before calling
const method = control.client.getModel().findObject(process.method.UpdateCard)
if (method === undefined) throw new Error(`Model missing UpdateCard: ${process.method.UpdateCard}; run model migrations`) Type guard
function hasMethod(model: Model, id: Ref<Class<Doc>>): boolean { return model.findObject(id) !== undefined } Try / catch
try {
await executeResultSet(control, results, execution)
} catch (err) {
if (err.code === 'process:error:MethodNotFound' && err.methodId === process.method.UpdateCard) {
console.error('UpdateCard method missing; apply model upgrade before running processes')
return
}
throw err
} Prevention
- Keep service and model versions in lockstep; always run migrations on upgrade.
- Add a startup check that all process.method constants resolve in the model.
- Do not strip mixins or classes when importing model data.
- Monitor process:error:MethodNotFound occurrences as a deploy health signal.
When it happens
Trigger: Calling executeResultSet (via res) in a workspace whose model lacks the process.method.UpdateCard class — e.g. the process model upgrade/migration was not applied, or the method id changed between versions.
Common situations: Deploying an older process service against a newer model (or vice versa), a failed or skipped model migration, or custom deployments that stripped or renamed the UpdateCard method class.
Related errors
- process.error.MethodNotFound
- ancestors not found: ${_class}
- class not found: ${_class}
- Map is not allowed in model
- Set is not allowed in model
AI-assisted analysis of hcengineering/platform@63e28dc964 (2026-08-29).
Data as JSON: /api/errors/f3109160f72fbbe8.
Report an issue: GitHub.