diff --git a/lib/dialects/http.js b/lib/dialects/http.js
index <HASH>..<HASH> 100644
--- a/lib/dialects/http.js
+++ b/lib/dialects/http.js
@@ -31,9 +31,6 @@ function INIT(options) {
 function httpRequest(operation) {
   var self = this
   return function(req, resp) {
-    if (!~ self._allowedJobTypes.indexOf(req.params.jobType))
-      return $done('Not a valid job type', 400);
-
     var $done = function(err, code, msg) {
       if (!msg && !_.isNumber(code)) {
         msg = code||''      // `code` is optional
@@ -45,6 +42,9 @@ function httpRequest(operation) {
       resp.end(!!err ? ''+err : (''+msg || ''))
     }
 
+    if (!~ self._allowedJobTypes.indexOf(req.params.jobType))
+      return $done('Not a valid job type', 400);
+
     return OPS[operation](req, resp, $done)
   }
 }
Fix bug if bad job-type passed to HTTP dialect