* @param middlewares
* @throws Exception
*/
private void handle(final Request request, final Response response, final List<Middleware> middlewares) throws Exception {
if (middlewares.isEmpty()) {
throw new NotFoundException();
}
Middleware current = middlewares.remove(0);
current.handle(request, response, new MiddlewareChain() {
@Override