Fixed HTTPError code check