Fix a bug when dealing with non-200 HTTP response.