Merge pull request #2519 from appwrite/fix-500-status-code
fix: status code on uncaught exception
This commit is contained in:
commit
aae56831fb
1 changed files with 2 additions and 0 deletions
|
@ -182,6 +182,8 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo
|
||||||
$db = null;
|
$db = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$swooleResponse->setStatusCode(500);
|
||||||
|
|
||||||
if(App::isDevelopment()) {
|
if(App::isDevelopment()) {
|
||||||
$swooleResponse->end('error: '.$th->getMessage());
|
$swooleResponse->end('error: '.$th->getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue