add mongoose error handler