Jersey/JAX-RS WriterInterceptor and HTTP Status

324 Views Asked by At

I have a problem with Jersey, I am writing a WriterInterceptor which should save the answer to the database, the problem is that I cannot retrieve the httpstatus, to avoid saving the answer in case of an error, I tried @Context HttpServletResponse but the status is 200 when it becomes 500 shortly after, how can I inject 'Response'? Or ContainerResponse/ContainerResponseContext?

0

There are 0 best solutions below