FieldError createViolation discussion
See original GitHub issueJust a question, is there a reason to generate fieldName
like
final String fieldName = error.getObjectName() + "." + error.getField();
I’m questioning myself about error.getObjectName()
since problem-spring-web has been designed to expose errors through http to client.
From what I experimented error.getObjectName()
represents Java method name or Java simple class name like:
UserDto
or getUser
if you are using MethodValidationPostProcessor
Generally I won’t leak any internal information to client, even more that it seems not really useful for him.
What do you think about?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
FieldError (Spring Framework 6.0.2 API)
public class FieldError extends ObjectError. Encapsulates a field error, that is, a reason for rejecting a specific field value.
Read more >The problem-spring-web from zalando - GithubHelp
FieldError createViolation discussion. Just a question, is there a reason to generate fieldName like. final String fieldName = error.getObjectName() + ".
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@whiskeysierra yes sorry I was a bit busy this week. I will submit tomorrow
I’d say that’s ok.