diff options
Diffstat (limited to 'actions/postnotice.php')
-rw-r--r-- | actions/postnotice.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actions/postnotice.php b/actions/postnotice.php index f092d54d1..ad3f00e34 100644 --- a/actions/postnotice.php +++ b/actions/postnotice.php @@ -74,6 +74,14 @@ class PostnoticeAction extends Action $srv = new OMB_Service_Provider(null, omb_oauth_datastore(), omb_oauth_server()); $srv->handlePostNotice(); + } 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; |