Return an error explicitly if an API response is an error one. Otherwise, a tricky error is caught by except Exception: