test(invocation): verify arguments versus aggregated policies

This commit is contained in:
Steve Moyer
2024-11-27 10:20:40 -05:00
parent 1166a68e5c
commit ce1a4b6e32
14 changed files with 200 additions and 61 deletions

View File

@@ -134,7 +134,7 @@ func (t *Token) verifyArgs(delegations []*delegation.Token, arguments *args.Args
ok, statement := policies.Match(argsIpld)
if !ok {
return fmt.Errorf("the following UCAN policy is not satisfied: %v", statement.String())
return fmt.Errorf("%w: %v", ErrPolicyNotSatisfied, statement.String())
}
return nil