*/
class UpdateprofileAction extends Action
{
-
/**
* For initializing members of the class.
*
$license = $_POST['omb_listenee_license'];
$site_license = common_config('license', 'url');
if (!common_compatible_license($license, $site_license)) {
- $this->clientError(sprintf(_('Listenee stream license ā%1$sā is not '.
- 'compatible with site license ā%2$sā.'),
+ // TRANS: Client error displayed when trying to update profile with an incompatible license.
+ // TRANS: %1$s is the license incompatible with site license %2$s.
+ $this->clientError(sprintf(_('Listenee stream license "%1$s" is not '.
+ 'compatible with site license "%2$s".'),
$license, $site_license));
return false;
}
$srv = new OMB_Service_Provider(null, omb_oauth_datastore(),
omb_oauth_server());
$srv->handleUpdateProfile();
+ } catch (OMB_RemoteServiceException $rse) {
+ $msg = $rse->getMessage();
+ if (preg_match('/Revoked accesstoken/', $msg) ||
+ preg_match('/No subscriber/', $msg)) {
+ $this->clientError($msg, 403);
+ } else {
+ $this->clientError($msg);
+ }
} catch (Exception $e) {
$this->serverError($e->getMessage());
return;