0

I have over-ridden ContainerRequestFilters by class A and ContainerResponseFilters by Class B.

Now whenever there is a rest call, class A gets the request first and then it goes to another class, Class C.

The flow is, request comes to Class A, then it goes to class C and finally to Class B.

Now when I see that something is not good and I need to send a response, how can I do it from class A. I need to bypass class C.

Swaraj Shekhar
  • 187
  • 1
  • 7
  • 28

1 Answers1

0

Throw exception and catch it in your main class or using ExceptionMapper - Return exception from JAX-RS Rest Service as JSON.

Community
  • 1
  • 1
Justinas Jakavonis
  • 8,220
  • 10
  • 69
  • 114