mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge pull request #2964 from appwrite/fix-double-event-log
Fix PDOException double event log
This commit is contained in:
@@ -321,6 +321,10 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project, $l
|
||||
$version = App::getEnv('_APP_VERSION', 'UNKNOWN');
|
||||
$route = $utopia->match($request);
|
||||
|
||||
if ($error instanceof PDOException) {
|
||||
throw $error;
|
||||
}
|
||||
|
||||
if($logger) {
|
||||
if($error->getCode() >= 500 || $error->getCode() === 0) {
|
||||
try {
|
||||
@@ -371,10 +375,6 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project, $l
|
||||
}
|
||||
}
|
||||
|
||||
if ($error instanceof PDOException) {
|
||||
throw $error;
|
||||
}
|
||||
|
||||
$code = $error->getCode();
|
||||
$message = $error->getMessage();
|
||||
$file = $error->getFile();
|
||||
|
||||
Reference in New Issue
Block a user