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.

Handle javax.validation.ConstraintViolationException

See original GitHub issue

Right now only the Spring specific MethodArgumentNotValidException is handled, might be useful to handle ConstraintViolationException of javax.validation - which would add a dependency (or have it optional?)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

17reactions
whiskeysierracommented, Sep 9, 2015
@RequestParam @Min(2) Integer parameter,  // throws ConstraintViolationException
@RequestBody @Valid BodyModel body        // throws MethodArgumentNotValidException

Facepalm

0reactions
edwmamedovcommented, Mar 15, 2018

@whiskeysierra yep. BTW swagger 2.8.0 solved this bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

handling the javax.validation.ConstraintViolationException in ...
500 is a server problem. It means your server encounter a problem while executing the code. Specifically it's ConstraintViolationException which means you ...
Read more >
How to handle Constraint violation exception using ...
Spring boot provides a nice and easy way to do proper validation for RequestParams or PathVariables using Validated annotation. In this article, we...
Read more >
javax.validation.ConstraintViolationException java code ...
Best Java code snippets using javax.validation. ... objects should be validated" ); } catch ( ConstraintViolationException e ) { assertEquals( 1, e.
Read more >
ConstraintViolationException (Java(TM) EE 7 Specification APIs)
Set of constraint violations reported during a validation. Methods inherited from class java.lang.Throwable · addSuppressed, fillInStackTrace, getCause, ...
Read more >
How to handle Constraint violation exception using ... - Tealfeed
In this article, we will cover how we can handle the Constraint violation exception which is thrown by Spring boot and send the...
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