Catch BadStatusLine exception on all afunction