- Hello.java shows how to custom error response by
InvocationException
. - Once other kind of
Exception
is thrown by business code, you can defined a converter implementingExceptionToProducerResponseConverter
to catch and convert response. In this case, remember to define a SPI config file for yourExceptionToProducerResponseConverter
implement class.