Error Handling

You can handle internal errors on both global and per-service levels.

In case of exception, Ressor first checks whether service has its own error handler and then use it. Unless, global one will be used. If none available, it will output stack trace using Slf4j.

Per-service

var errorHandler = new SimpleErrorHandler(
t -> t.printStackTrace());
ressor.service(Service.class)
.errorHandler(errorHandler)

Global

var errorHandler = new SimpleErrorHandler(
t -> t.printStackTrace());
var config = new RessorConfig().errorHandler(errorHandler);
var ressor = Ressor.create(config);