} catch (StrestHttpException e) {
throw e;
} catch (Exception x) {
StrestHttpException e = StrestHttpException.INTERNAL_SERVER_ERROR();
e.setCause(x);
log.error("Caught", x);
throw e;
}
} catch (StrestHttpException e) {
response.status(e.getCode(), e.getMessage());
response.txnStatus(StrestUtil.HEADERS.TXN_STATUS_VALUES.COMPLETE);
//run the error filters
if (controller != null) {
for (StrestControllerFilter f : controller.getFilters()) {
f.error(controller, response.getResponse(), e);