Fix crash on certain types of error response.