Proper error handling.
Wait until the end of the response.