]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
400 code needs ClientException
authorStephen Paul Weber <singpolyma@singpolyma.net>
Fri, 10 Jun 2016 21:01:23 +0000 (21:01 +0000)
committerStephen Paul Weber <singpolyma@singpolyma.net>
Fri, 10 Jun 2016 21:01:23 +0000 (21:01 +0000)
plugins/Linkback/actions/webmention.php

index 30bc42cea92e1eae759484cae812e10d5f19b06c..7a80dfef77e0364d0fe8a8f3b975f130b682213d 100644 (file)
@@ -40,30 +40,30 @@ class WebmentionAction extends Action
 
         if(!$source) {
             echo _m('"source" is missing')."\n";
-            throw new ServerException(_m('"source" is missing'), 400);
+            throw new ClientException(_m('"source" is missing'), 400);
         }
 
         if(!$target) {
             echo _m('"target" is missing')."\n";
-            throw new ServerException(_m('"target" is missing'), 400);
+            throw new ClientException(_m('"target" is missing'), 400);
         }
 
         $response = linkback_get_source($source, $target);
         if(!$response) {
             echo _m('Source does not link to target.')."\n";
-            throw new ServerException(_m('Source does not link to target.'), 400);
+            throw new ClientException(_m('Source does not link to target.'), 400);
         }
 
         $notice = linkback_get_target($target);
         if(!$notice) {
             echo _m('Target not found')."\n";
-            throw new ServerException(_m('Target not found'), 404);
+            throw new ClientException(_m('Target not found'), 404);
         }
 
         $url = linkback_save($source, $target, $response, $notice);
         if(!$url) {
             echo _m('An error occured while saving.')."\n";
-            throw new ServerException(_m('An error occured while saving.'), 500);
+            throw new ClientException(_m('An error occured while saving.'), 500);
         }
 
         echo $url."\n";