-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConstraintViolationException HTTP status should be configurable #313
ConstraintViolationException HTTP status should be configurable #313
Conversation
0c5e8c4
to
021d5de
Compare
Yup, but it will be later today (evening/night) at the earliest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
c2e7151
to
ce0ffd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm leaving my comments here as well, I hope that's ok 😊
|
||
- Include MDC properties in the API response (you have to provide those properties to MDC using `MDC.put`) | ||
- (Build time) Include MDC properties in the API response. You have to provide those properties to MDC using `MDC.put` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's worth to mention that this extension uses org.slf4j
instead of jboss logging
. Thus a user has to pick the appropriated MDC ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. On the other hand, quick tests show that setting properties via org.jboss.logging.MDC
just works, jboss probably propagates everything to slf4j (or is a service provider etc). I'll double check that in real app though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah cool, wasn't aware of that. Thanks for pointing this out.
|
||
@Override | ||
public String title() { | ||
return "Bad Request"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's worth to define a constant to keep the default values aligned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I didn't like this defaults() method that much from the very beginning, will try to simplify this.
...va/com/tietoevry/quarkus/resteasy/problem/validation/ConstraintViolationExceptionMapper.java
Show resolved
Hide resolved
That's more than ok, really appreciated! |
Turns out
HttpProblem
relied onResponse.Status
a bit too much, which is being addressed in #314Closes #273