Fix crash on an error response of the new api.