added catch exception for non 200 status code errors