[resteasy-dev] resteasy jax-rs fail fast on entity validation exception

Alessio Soldano asoldano at redhat.com
Wed Oct 25 05:26:21 EDT 2017


Hi John,
sorry, I'm a bit busy atm, anyway I'm forwarding your email to the
resteasy-dev list. We'll get back to you.

Cheers
Alessio

On Tue, Oct 24, 2017 at 11:59 AM, John O'Hara <johara at redhat.com> wrote:

> Alessio,
>
> I am not sure if you are the correct person to ask, if not please let me
> if there is someone more appropriate to ask.
>
> I have been investigating some unexpected behaviour in how entity
> validations exceptions are propagated through WF/EAP when http post
> requests are made via rest endpoints.
>
> One thing I have noticed in the resteasy-jaxrs module is that
> in org.jboss.resteasy.core.MethodInjectorImpl.invoke() the method
> parameters are validated [1], but the method is still invoked, irrespective
> of the outcome of the call to the validator [2]
>
> Is there is a possibility of failing a method invocation after the
> validation call [1], so that we do not invoke the method, which ends up
> failing anyway due to validation exceptions?
>
> Thanks
>
> John
>
> [1] https://github.com/resteasy/Resteasy/blob/master/
> resteasy-jaxrs/src/main/java/org/jboss/resteasy/core/
> MethodInjectorImpl.java#L119
> [2] https://github.com/resteasy/Resteasy/blob/master/
> resteasy-jaxrs/src/main/java/org/jboss/resteasy/core/
> MethodInjectorImpl.java#L140
>
> --
>
> JOHN O'HARA
>
> PRINCIPAL SOFTWARE ENGINEER
>
> Red Hat <https://www.redhat.com/>
> <https://red.ht/sig>
> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted>
> @redhatway <https://twitter.com/redhatway>   @redhatinc
> <https://instagram.com/redhatinc>   @redhatsnaps
> <https://snapchat.com/add/redhatsnaps>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/resteasy-dev/attachments/20171025/7492907d/attachment.html 


More information about the resteasy-dev mailing list