Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): turn validation errors into metadata errors
Validation errors are currently turned into exceptions. This causes issues where missing context values lead to validation errors (such as in the case of `DnsValidatedCertificate`): the error would have been solved by retrieving the context value, but because an exception is thrown the CLI stops immediately and doesn't re-execute. I feel it also makes sense to treat these errors as construct errors, as opposed to exceptions which I feel should be more "you're misusing the API" kind of errors, rather than "something is wrong somewhere" kind of errors. The change I made is the smallest change to achieve the desired effect. If we agree that we want this change, it would probably be better to do it differently, just have `.validate()` implementors call `this.node.addError()` immediately. Fixes #2076.
- Loading branch information