Error if no credential change operations generated.

This commit is contained in:
Jim McDonald
2023-02-09 19:37:26 +00:00
parent 59200e796a
commit 5b2e62c29e
6 changed files with 13 additions and 12 deletions

View File

@@ -73,6 +73,10 @@ func (c *command) process(ctx context.Context) error {
return err
}
if len(c.signedOperations) == 0 {
return errors.New("no suitable validators found; no operations generated")
}
if validated, reason := c.validateOperations(ctx); !validated {
return fmt.Errorf("operation failed validation: %s", reason)
}