Fixed error handling logic for request token response.