There is a service that has an expanded URL-tree. The whole service works on JAX-RS (more precisely RESTeasy under WildFly). Everything works fine, but recently a problem has arisen: is it possible in any way to handle requests that have gone beyond the tree? That is, for example, there are several described URL chains like:
/users/
/users/{id}/
/users/{id}/connect
And so on. At the same time, there are no subnets in users
except {id}. Suppose that suddenly a request arrives at the service along the path: /users/smth/
, that is, the path that is not /users/smth/
in the service. And this is where the problem begins, the server returns exception and returns an empty response. Is it possible to somehow customize the processing of such undiscovered ways?