]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apistatusesupdate.php
nofollow for peopletag pages
[quix0rs-gnu-social.git] / actions / apistatusesupdate.php
index bf367e1e181741e4d5626bd6332f0ae5432cc713..1956c85863d747173b4a15c8cc30e10f9caefe43 100644 (file)
@@ -244,11 +244,17 @@ class ApiStatusesUpdateAction extends ApiAuthAction
                 $options = array_merge($options, $locOptions);
             }
 
-            $this->notice =
-              Notice::saveNew($this->auth_user->id,
-                              $content,
-                              $this->source,
-                              $options);
+            try {
+                $this->notice = Notice::saveNew(
+                    $this->auth_user->id,
+                    $content,
+                    $this->source,
+                    $options
+                );
+            } catch (Exception $e) {
+                $this->clientError($e->getMessage());
+                return;
+            }
 
             if (isset($upload)) {
                 $upload->attachToNotice($this->notice);