Comments (5)
Thanks for the link, I wasn't aware of new version of RFC, really cool!
ConstraintViolationExceptionMapper
is already very close to this proposal, we have violations
instead of errors
, message
instead of detail
, and field
(+in
) instead of pointer
- or am I missing something?
We could make it configurable (opt-in) to keep it backward compatible.
from quarkus-resteasy-problem.
Thanks for the link, I wasn't aware of new version of RFC, really cool!
ConstraintViolationExceptionMapper
is already very close to this proposal, we haveviolations
instead oferrors
,message
instead ofdetail
, andfield
(+in
) instead ofpointer
- or am I missing something?
And the http status code 422 instead of 400. Which isn't a big deal anymore. But yeah, that's it. 👍
We could make it configurable (opt-in) to keep it backward compatible.
Sure, sounds fair enough.
An alternative would be to maintain a new 4.X stream where you can tackle all other discussed topics like:
- Getters instead of public members in HttpProblem
- Hide public access to register ProblemPostProcessors
- ConstraintViolationExceptionMapper comply with RFC 9457
- I have some more topics in my mind (which we haven't discussed yet):
- Handling of
Throwable
- Considering the priority definition of
PostProblemProcessor
vs.ExceptionMapper
, - Default problem logging happens before default post processor modifications.
- Handling of
I did not analyze the latter topics in detail yet. So I'm not sure if these are actually valid points. Just my thoughts on how to use the extension ...
from quarkus-resteasy-problem.
Thanks for the link, I wasn't aware of new version of RFC, really cool!
ConstraintViolationExceptionMapper
is already very close to this proposal, we haveviolations
instead oferrors
,message
instead ofdetail
, andfield
(+in
) instead ofpointer
- or am I missing something?And the http status code 422 instead of 400. Which isn't a big deal anymore. But yeah, that's it. 👍
I don't see it in RFC to be frank. 422 response is used as an example of multi-problem response, but I don't see any indication regarding 422 being a replacement for 400 in general.
An alternative would be to maintain a new 4.X stream where you can tackle all other discussed topics like:
The idea is to keep major version aligned with Quarkus versions. It puts a constraint into the type of changes we can or cannot do here, but I think it's worth it, as it makes less confusion (we don't have to explain that quarkus-resteasy-problem 5.X.X is compatible with Quarkus 7.X.X). Migrating into Quarkiverse will not make it easier, as we will also have to keep backward compatibility with Quarkus minor releases.
from quarkus-resteasy-problem.
Thanks for the link, I wasn't aware of new version of RFC, really cool!
ConstraintViolationExceptionMapper
is already very close to this proposal, we haveviolations
instead oferrors
,message
instead ofdetail
, andfield
(+in
) instead ofpointer
- or am I missing something?And the http status code 422 instead of 400. Which isn't a big deal anymore. But yeah, that's it. 👍
I don't see it in RFC to be frank. 422 response is used as an example of multi-problem response, but I don't see any indication regarding 422 being a replacement for 400 in general.
The http response code is a recommendation in the same way as the whole response structure for multi-problem responses. The spec is not saying you have to do it. If you would align the structure, but keep the http status code 400 for violations, then it's your decision. However, IMHO then you don't follow the recommendation.
Edit. You're right. The http response code is not explicitly mentioned in the RFC itself and thus let's ignore it.
An alternative would be to maintain a new 4.X stream where you can tackle all other discussed topics like:
The idea is to keep major version aligned with Quarkus versions. It puts a constraint into the type of changes we can or cannot do here, but I think it's worth it, as it makes less confusion (we don't have to explain that quarkus-resteasy-problem 5.X.X is compatible with Quarkus 7.X.X). Migrating into Quarkiverse will not make it easier, as we will also have to keep backward compatibility with Quarkus minor releases.
IMHO this an artificial limitation which you guys agreed up on. I'm a maintainer of a Quarkiverse extension as well and nobody forced me to align version numbers or support old Quarkus versions.
from quarkus-resteasy-problem.
IMHO this an artificial limitation which you guys agreed up on. I'm a maintainer of a Quarkiverse extension as well and nobody forced me to align version numbers or support old Quarkus versions.
Yes, and no.
Yes, because in Quarkiverse your main/master branch must be compatible only with latest Quarkus, outside Quarkiverse we aim to keep 3.1.0 compatible with all 3.X.X version of Quarkus, which makes it more challenging.
No, because even in Quarkiverse, if you want to follow semver principles, you should not make breaking changes for your users with minor releases. Now the question is - minor releases of what? Extension or Quarkus? I'd say: Quarkus, because extension versions are hidden from end users, they just include quarkiverse bom in their poms, which gives you, as extension developer, a certain freedom, but in the end - extension should not break anything when I update Quarkus from X.Y.Z to X.(Y+1).Z.
On the other hand Quarkus sometimes break things in minor releases, but I choose to believe it's not on purpose ;)
from quarkus-resteasy-problem.
Related Issues (20)
- Improve validation problem responses
- Jackson's `InvalidFormatException` produces invalid 'field' value if caused by collection item
- Missing `WWW-Authenticate` header when `UnauthorizedException` or `AuthenticationFailedException` is thrown
- Quickstarts are broken
- instance field may contain data that is not a URI HOT 6
- Fails with Quarkus `2.12.0.CR1` due to `ProblemProcessor#warnOnMissingSmallryeMetricsDependency` HOT 3
- Is there a way to attach stack traces to exceptions? HOT 1
- `HttpAuthenticator` is ignored when authentication fails
- ValidationException should not result in HTTP 400 status HOT 4
- Throwing `ConstraintViolationException` with null as `constraintViolations` results in NPE in exception mapper
- ConstraintViolationException HTTP status should be configurable HOT 8
- Issue regarding propertynames in constraintviolation. HOT 13
- Improve dev experience of creating custom ProblemPostProcessor HOT 4
- Quarkus Resteasy Problem is still flagged as experimental HOT 10
- Not all Jackson exceptions mapper have been overruled HOT 3
- An opt-in or opt-out mechanism for default ProblemPostProcessors HOT 2
- The default for the "instance" field violates the RFC HOT 2
- NullpointerException WebApplicationException when Response Headers not set HOT 2
- Exception occurring when encoding the path containing unwise characters (i.e space) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quarkus-resteasy-problem.