@@ -55,8 +55,7 @@ pub fn run(args: PolicyArgs, acon_path: &str) {
5555 "session" => agentic_contract:: PolicyScope :: Session ,
5656 "agent" => agentic_contract:: PolicyScope :: Agent ,
5757 other => {
58- eprintln ! ( "Unknown scope: {}" , other) ;
59- return ;
58+ crate :: fail ( & format ! ( "Unknown scope: {}" , other) ) ;
6059 }
6160 } ;
6261 let action = match action. as_str ( ) {
@@ -65,8 +64,7 @@ pub fn run(args: PolicyArgs, acon_path: &str) {
6564 "require_approval" => agentic_contract:: PolicyAction :: RequireApproval ,
6665 "audit_only" => agentic_contract:: PolicyAction :: AuditOnly ,
6766 other => {
68- eprintln ! ( "Unknown action: {}" , other) ;
69- return ;
67+ crate :: fail ( & format ! ( "Unknown action: {}" , other) ) ;
7068 }
7169 } ;
7270
@@ -84,8 +82,7 @@ pub fn run(args: PolicyArgs, acon_path: &str) {
8482 "session" => agentic_contract:: PolicyScope :: Session ,
8583 "agent" => agentic_contract:: PolicyScope :: Agent ,
8684 other => {
87- eprintln ! ( "Unknown scope: {}" , other) ;
88- return ;
85+ crate :: fail ( & format ! ( "Unknown scope: {}" , other) ) ;
8986 }
9087 } ;
9188 let result = engine. check_policy ( & action_type, scope) ;
0 commit comments