eclipse-ee4j / eclipse-ee4j/jersey
Jersey/JAX-RS WriterInterceptor and HTTP Status
Open
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
I have a a question, I am writing a `WriterInterceptor` which should save the answer entity to the database, the problem is that I cannot retrieve the HTTP status inside the Interceptor, 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 (in the class `org.glassfish.jersey.servlet.ServletContainer`), how can I inject '`Response`'? Or `ContainerResponse`/`ContainerResponseContext`?
Contributor guide
Assessment
This issue has not been assessed yet.