Class WhiteLabelErrorRoutesConfigurer<A extends ExchangeContext>

java.lang.Object
io.inverno.mod.web.server.WhiteLabelErrorRoutesConfigurer<A>
Type Parameters:
A - the exchange context type
All Implemented Interfaces:
ErrorWebRouter.Configurer<A>

public class WhiteLabelErrorRoutesConfigurer<A extends ExchangeContext> extends Object implements ErrorWebRouter.Configurer<A>

Configures white label error routes handling common HTTP errors and responding with application/json, text/html or text/plain.

This provides a simple and convenient way to handle errors in a Web server on an environment where exposing stacktrace is not a security concern. It is however recommended to provide proper error handlers that comply with security policies.

Since:
1.12
Author:
Jeremy Kuhn