further enhanced error handling + added retries in case of parallel writes

This commit is contained in:
2026-06-03 17:27:51 +02:00
parent d0daa7e937
commit fc84d55bd6
21 changed files with 184 additions and 383 deletions

View File

@ -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");
}