mirror of
https://github.com/nexu-io/openmotion.git
synced 2026-12-02 04:50:19 +08:00
* fix(tracking): report actionable MCP and export failures * test: fix polling and packaged onboarding regressions * fix(tracking): deduplicate cancellation and classify nested validation * fix(tracking): report a missing tool action before variant ambiguity --------- Co-authored-by: 罗高 <luogao@users.noreply.github.com>
16 lines
468 B
TypeScript
16 lines
468 B
TypeScript
import type { validationRules } from '../tracking/tool-fields.ts';
|
|
type ValidationRule = typeof validationRules[number];
|
|
|
|
export class ToolInputError extends Error {
|
|
readonly code = 'INVALID_ARGUMENT';
|
|
|
|
readonly invalid_field: string;
|
|
readonly validation_rule: ValidationRule;
|
|
|
|
constructor(message: string, field: string, rule: ValidationRule) {
|
|
super('INVALID_ARGUMENT: ' + message);
|
|
this.invalid_field = field;
|
|
this.validation_rule = rule;
|
|
}
|
|
}
|