]> granicus.if.org Git - pdns/commitdiff
webserver: send 422 when request was incomplete
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Tue, 28 Jan 2014 20:10:19 +0000 (21:10 +0100)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Tue, 28 Jan 2014 20:12:21 +0000 (21:12 +0100)
pdns/ws.cc

index 7a7498259d467f4153d16c4698c074f9f18cd0d9..3edd78c74a60db29445eb82729646307a83de3e7 100644 (file)
@@ -830,7 +830,7 @@ static void apiWrapper(boost::function<void(HttpRequest*,HttpResponse*)> handler
   } catch (ApiException &e) {
     string what = e.what();
     resp->body = returnJSONError(what);
-    resp->status = 400;
+    resp->status = 422;
     return;
   }