You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Andrew Lienhard <an...@gmail.com> on 2022/07/07 14:40:25 UTC
custom error response
Apologies if I overlooked existing documentation on how to do this, but I'm
trying to override the default CXF error response in our unomi (karaf/OSGi)
server. Currently the default is an HTML 404 message that (I think) comes
from the generateNotFound() method in the CXF ServletController. This is
the message: "<html><body>No service was found.</body></html>".
Is it possible to configure a more API-friendly response per a custom error
handler class? Our goal is to return JSON instead of HTML for all CXF
errors.
Thanks