[IMP] purchase: put back sql request to set exception message and avoid context hack