-
Notifications
You must be signed in to change notification settings - Fork 7
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
Specify support for Jakarta REST ExceptionMapper<T>
#89
Comments
I agree that this is an aspect which may need clarification. I see two options for this:
I'm not completely sure how to proceed here. Actually, I really like the fact the Krazo currently simply transforms the |
I'd prefer the first option, as this seems to be the easiest and most transparent way of handling exceptions in this case. Sure, we need to make |
Added this to the upcoming milestone as this seems like a important feature to me, because a good exception handling is important for UX and security. |
I agree that option 1 could be the best way to go. But maybe |
I think it should be an interface too. So it is easier to integrate it in existing other MVC implementations which are not based on Jakarta MVC but maybe want to be in the future. |
But in this case users would have to create an instance of some MVC implementation class to actually use this feature, correct? Not sure how it could work without this. |
Ah right. Hmm... probably we can do something with |
Yeah, possible. But I wonder if providing an actual class instead of an interface in the API would be simpler? Just thinking out loudly. Not sure which way I prefer TBH. |
I recognized that we're not specifying exception handling in MVC applications or, at least, how the existing approaches shall be used. In my opinion, we should add some section about how MVC implementations should handle the response from
jakarta.ws.rs.ext.ExceptionMapper
implementations, because at the moment there is the need to use Krazo-specific API (Viewable
).I think the implementations should ensure, that we can return the same values as in
@Controller
annotated resources, so we have a consistent and clear behavior. The example posted above would then look like this:Please add your feedback or possible Jakarta REST limitations which I'm not aware of.
The text was updated successfully, but these errors were encountered: