@Override
public void endRequest(RequestContext context) {
Response response = context.getResponse();
if (response instanceof ValidationError) {
ValidationError error = (ValidationError)response;
String id = context.getParameters().get("id").getValue();
Iterator<ConstraintViolation<Object>> v = error.getViolations().iterator();
Booking booking = (Booking)error.getViolations().iterator().next().getLeafBean();
while (v.hasNext()) {
ConstraintViolation<Object> c = v.next();
Iterator<javax.validation.Path.Node> nodeIter = c.getPropertyPath().iterator();
javax.validation.Path.Node node = null;
while (nodeIter.hasNext()) {