diff --git a/src/Exception/HTTPException.php b/src/Exception/HTTPException.php
index <HASH>..<HASH> 100755
--- a/src/Exception/HTTPException.php
+++ b/src/Exception/HTTPException.php
@@ -42,6 +42,7 @@ class HTTPException extends \Exception
         // store general error data
         $this->errorStore = new ErrorStore($errorList);
         $this->errorStore->title = $title;
+        $this->errorStore->code = $localCode;
 
         $this->di = \Phalcon\DI::getDefault();
     }
Adding the correct HTTP code to its ErrorStore object