mongo error handler