I followed this post to customise HTTP 500 errors (Internal Server Error) in a Zuul application.
This happens, for example, when a service configured in Zuul is not available and routing therefore fails. The solution in that post works very well, allowing one to implement a custom filter to output a custom error response.
However, I haven't so far been able to output a custom error response when a 404 error (not found) occurs. i.e. when a service url is requested that is not even configued in Zuul. In this case, the error appears to be dealt with very early in the request lifecycle and an error response sent before the ZuulFilters are executed.
I would vbe very grateful for any advice as how to customise the response from Zuul in the case of a 404 error. Thank you for considering this post.