fix(error-handling): handle FileNotFoundError in robot.helper_actor_config #3151

Merged
freemo merged 1 commits from fix/error-handling-helper-actor-config-file-not-found into master 2026-04-05 21:14:53 +00:00
2 changed files with 11 additions and 1 deletions
+6
View File
@@ -40,3 +40,9 @@ V2 Actor Config Produces Provider And Graph Descriptor
List Should Contain Value ${payload['graph_keys']} agents
List Should Contain Value ${payload['graph_keys']} routes
Should Be Equal As Numbers ${payload['options']['temperature']} 0.5
Missing Config File Exits With Non-Zero Code And Stderr Message
${missing}= Set Variable ${OUTPUT DIR}/does_not_exist_actor.yaml
${result}= Run Process ${PYTHON} robot/helper_actor_config.py ${missing}
Should Not Be Equal As Integers ${result.rc} 0
Should Contain ${result.stderr} Error: Config file not found at '${missing}'
+5 -1
View File
@@ -12,7 +12,11 @@ def main() -> None:
raise SystemExit("config path required")
config_path = Path(sys.argv[1])
config = ActorConfiguration.from_file(path=config_path)
try:
config = ActorConfiguration.from_file(path=config_path)
except FileNotFoundError:
print(f"Error: Config file not found at '{config_path}'", file=sys.stderr)
sys.exit(1)
payload = {
"provider": config.provider,
"model": config.model,