Improvements to Mongoid error serialization