context.clientError(404);
return;
}
Renderer<?> renderer = context.first(RENDERER_TYPE_TOKEN, new RendererForTypePredicate(toRender.getClass()))
.orElseThrow(() -> new NoSuchRendererException(toRender));
try {
doRender(toRender, renderer, context);
} catch (Exception e) {
throw new RendererException(renderer, toRender, e);