diff --git a/apps/Sandbox/bootstrap/contexts/api.php b/apps/Sandbox/bootstrap/contexts/api.php
index <HASH>..<HASH> 100644
--- a/apps/Sandbox/bootstrap/contexts/api.php
+++ b/apps/Sandbox/bootstrap/contexts/api.php
@@ -80,6 +80,10 @@ OK: {
 }
 
 ERROR: {
+    if (PHP_SAPI === 'cli') {
+        $app->exceptionHandler->handle($e);
+        exit;
+    }
     http_response_code($code);
     echo $body;
     exit(1);
[#<I>] exception is handle by api.php in develop