Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Surface the required block that's missing in the error.
Our current diagnostic only surfaces that a required argument was not set, but doesn't actually tell you which one. This updates the error message to match the error returned by core, which includes the name of the field that's missing. Why do we return an error if core returns an error? Because core returns the error only for required _attributes_, because as far as core is concerned, there is no such thing as required blocks. Only attributes can have flags, and "required" is a flag, so there can't be "required" blocks. But historically blocks have been able to be required, so the SDK fakes it by doing provider-side validation on the block. But the error message was less than helpful. This fixes the error message to be more actionable. Fixes #535.
- Loading branch information