Improved error handling of BeanCan 2.