Catch httplib.BadStatusLine exception