question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FieldError createViolation discussion

See original GitHub issue

Just 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:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kakawaitcommented, Jan 19, 2017

@whiskeysierra yes sorry I was a bit busy this week. I will submit tomorrow

0reactions
whiskeysierracommented, Jan 20, 2017

I can’t really remove error.getObjectName() because there is no other information to exploit.

I’d say that’s ok.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found