Merge pull request #4555 from appwrite/feat-4535-remove-pdo-rethrow
Remove PDO rethrow
This commit is contained in:
commit
68d31d4ac7
2 changed files with 0 additions and 12 deletions
|
@ -403,11 +403,6 @@ App::error()
|
||||||
$version = App::getEnv('_APP_VERSION', 'UNKNOWN');
|
$version = App::getEnv('_APP_VERSION', 'UNKNOWN');
|
||||||
$route = $utopia->match($request);
|
$route = $utopia->match($request);
|
||||||
|
|
||||||
/** Delegate PDO exceptions to the global handler so the database connection can be returned to the pool */
|
|
||||||
if ($error instanceof PDOException) {
|
|
||||||
throw $error;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($logger) {
|
if ($logger) {
|
||||||
if ($error->getCode() >= 500 || $error->getCode() === 0) {
|
if ($error->getCode() >= 500 || $error->getCode() === 0) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -317,13 +317,6 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo
|
||||||
Console::error('[Error] File: ' . $th->getFile());
|
Console::error('[Error] File: ' . $th->getFile());
|
||||||
Console::error('[Error] Line: ' . $th->getLine());
|
Console::error('[Error] Line: ' . $th->getLine());
|
||||||
|
|
||||||
/**
|
|
||||||
* Reset Database connection if PDOException was thrown.
|
|
||||||
*/
|
|
||||||
if ($th instanceof PDOException) {
|
|
||||||
$db = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$swooleResponse->setStatusCode(500);
|
$swooleResponse->setStatusCode(500);
|
||||||
|
|
||||||
$output = ((App::isDevelopment())) ? [
|
$output = ((App::isDevelopment())) ? [
|
||||||
|
|
Loading…
Reference in a new issue