- common_debug('couldn\'t get access token.');
- print "Token exchange failed. Has the request token been authorized?\n";
+ // Token exchange failed -- log it
+
+ $msg = sprintf(
+ 'API OAuth - Failure exchanging OAuth request token for access token, '
+ . 'request token = %s, verifier = %s',
+ $this->reqToken,
+ $this->verifier
+ );
+
+ common_log(LOG_WARNING, $msg);
+ // TRANS: Client error given from the OAuth API when the request token or verifier is invalid.
+ $this->clientError(_('Invalid request token or verifier.'), 400, 'text');