ErrorResponse error = new ErrorResponse();
error.message = e.getMessage();
if (e instanceof CustomerFacingException) {
CustomerFacingException cfe = (CustomerFacingException) e;
error.code = cfe.getCode();
for (CustomerFacingException.Info info : cfe.getInfo()) {
ErrorDetail errorInfo = new ErrorDetail();
errorInfo.code = info.getCode();
errorInfo.field = info.getField();
errorInfo.message = info.getMessage();