Fixed Http error handling