-
Notifications
You must be signed in to change notification settings - Fork 121
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
Standard for problem details [rfc-7807] #839
Comments
I’ll respond to Option 2 as this would not be the right mailing list to discuss Option 1 … JAX-RS is a core Java API to build RESTful services; what you’re describing here seems like something that can be built on top of JAX-RS or simply provided as a library in a framework. I.e., at least at first glance, I don’t think JAX-RS is the correct place for this.
… On Jan 27, 2020, at 11:32 PM, Rüdiger zu Dohna ***@***.***> wrote:
I'm working on producing and consuming problem details as specified in RFC-7807 for better generation and handling of http entities for application error conditions. I’ve just blogged about it: https://blog.codecentric.de/en/2020/01/rfc-7807-problem-details-with-spring-boot-and-jax-rs/ <https://blog.codecentric.de/en/2020/01/rfc-7807-problem-details-with-spring-boot-and-jax-rs/>
tl;dr: exceptions get mapped to rfc-7807 compliant application/problem+json http bodies on the server side and/or back to exceptions on the client side. You can rely on useful defaults for the fields or annotate your exceptions when you have specific requirements.
I have a potential implementation that runs on Payara and Open Liberty, and mostly on Widlfly 18... and on Spring Boot. I'd like this to become a standard in some form. I can see two options:
Option 1
Create a new MicroProfile standard, so it could be simply implemented also by Spring Boot. To hide the technical details the implementation, I'd like to hide the ResponseProcessingException <#838>. This option is what I'm currently working on.
Option 2
Integrate it directly into JAX-RS
What do you say?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#839>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABKT2NZ2UZPC7SNRY3WTHXLQ76YN3ANCNFSM4KMMHQZA>.
|
I'm not entirely sure if JAX-RS is the best place for this. On the one hand every application has to deal with problem/error reporting and people usually reinvent the wheel to implement it. So having out of the box support for such a standard would be great. On the other hand JAX-RS focuses on the core HTTP aspects of RESTful services and additional features like this are usually added by addon libraries or Microprofile (like the REST client for example). Other thoughts? |
JAX-RS should concentrate on the core of REST-over-HTTP, evertyhing else should be done by standards built ontop (like it was done for MVC, or like Microprofile does). It might happen (like it was the case for MVC) that JAX-RS needs to provide new extension points; I would be happy to discuss them once the need actually arises. |
@t1 Could we close this issue then? |
@spericas : I'm closing the issue now, as it seems to be the common thinking that it's nothing for jax-rs at the moment. |
I'm working on producing and consuming problem details as specified in RFC-7807 for better generation and handling of http entities for application error conditions. I’ve just blogged about it: https://blog.codecentric.de/en/2020/01/rfc-7807-problem-details-with-spring-boot-and-jax-rs/
tl;dr: exceptions get mapped to rfc-7807 compliant application/problem+json http bodies on the server side and/or back to exceptions on the client side. You can rely on useful defaults for the fields or annotate your exceptions when you have specific requirements.
I have a potential implementation that runs on Payara and Open Liberty, and mostly on Widlfly 18... and on Spring Boot. I'd like this to become a standard in some form. I can see two options:
Option 1
Create a new MicroProfile standard, so it could be simply implemented also by Spring Boot. To hide the technical details the implementation, I'd like to hide the ResponseProcessingException. This option is what I'm currently working on.
Option 2
Integrate it directly into JAX-RS
What do you say?
The text was updated successfully, but these errors were encountered: