feat: Provide detailed error messages for field.Set failures #7529
+16
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What did this pull request do?
Provide a detailed error message during Create/Save/Update...
User Case Description
Currently the error message too simple to diagnostic what's happened.
It's relative to #7510. I don't think the code is good. But to achieve the goal, we have to change our minds on error handling.
My opinion is create a customized error type, even it's internal. But looks like you don't like it? (Of course I understand it's difficult to make decision about make the error type public or not)