summaryrefslogtreecommitdiff
path: root/actions/updateprofile.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-02 13:38:10 -0800
committerBrion Vibber <brion@pobox.com>2010-03-02 13:38:10 -0800
commitddf3614c843bcd8d9ecfd0850ac9a8cefae6dbba (patch)
tree07b772b280e6f23761c0111d953b3c2f5b8d2120 /actions/updateprofile.php
parent8629664ed90ffb496f607d15491821217f6b3126 (diff)
parente9c127ddd869f44eafe7ae6b30d9dc69df8b863c (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'actions/updateprofile.php')
-rw-r--r--actions/updateprofile.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/actions/updateprofile.php b/actions/updateprofile.php
index e416a6fa9..bae6108cc 100644
--- a/actions/updateprofile.php
+++ b/actions/updateprofile.php
@@ -55,6 +55,8 @@ class UpdateprofileAction extends Action
*/
function prepare($argarray)
{
+ StatusNet::setApi(true); // Send smaller error pages
+
parent::prepare($argarray);
$license = $_POST['omb_listenee_license'];
$site_license = common_config('license', 'url');
@@ -75,6 +77,14 @@ class UpdateprofileAction extends Action
$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;