further enhanced error handling + added retries in case of parallel writes
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
require_once __DIR__ . '/../common.php';
|
||||
require_once __DIR__ . '/../db_init.php';
|
||||
require_once __DIR__ . '/../lib/response.php';
|
||||
require_once __DIR__ . '/../lib/errors.php';
|
||||
require_once __DIR__ . '/../lib/validate.php';
|
||||
require_once __DIR__ . '/../lib/api_log.php';
|
||||
|
||||
@ -71,7 +72,6 @@ try {
|
||||
require $handlerFile;
|
||||
|
||||
} catch (Throwable $e) {
|
||||
qdb_api_log_note_exception($e);
|
||||
error_log("Unhandled error on $method $route: " . $e->getMessage());
|
||||
json_error('SERVER_ERROR', 'Internal server error', 500);
|
||||
require_once __DIR__ . '/../lib/errors.php';
|
||||
qdb_emit_api_error($e, "API $method $route");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user