Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.7.2
-
None
-
Unknown
Description
TestCase:
JAX-RS annotated business method returns Response.
ExceptionMapper is registered on the client side.
Current behavior: If method throws RuntimeException, exception mapper is invoked for all methods except returning Response ones.
Desired behavior: Invoke exception mapper for methods returning Response as well, however only for "bad responses" status is >= 300. If exception mapper returns null instead exception, business method should be invoked with "bad response".
The reason: as far as user registers exception mapper on the client side (it is not mandatory), it makes sense to handle all errors in consistent way via exception mapper. In some special cases, when user would like to process "bad" HTTP Response in the business method, he can return null instead exception in exception mapper.