better esception handling in mongo and solr