From c7d73dcb8de43fda5cf29dcaefa7be3d303ee124 Mon Sep 17 00:00:00 2001 From: Jeff Raymakers Date: Tue, 3 Jun 2025 09:04:39 -0700 Subject: [PATCH] minor tweaks --- src/http_server.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/http_server.cpp b/src/http_server.cpp index 89c6b5f..ce5e821 100644 --- a/src/http_server.cpp +++ b/src/http_server.cpp @@ -385,8 +385,7 @@ void HttpServer::DoHandleRun(const httplib::Request &req, // If there's more than one statement, run all but the last. if (statement_count > 1) { for (auto i = 0; i < statement_count - 1; ++i) { - auto &statement = statements[i]; - auto pending = connection->PendingQuery(std::move(statement)); + auto pending = connection->PendingQuery(std::move(statements[i])); // Return any error found before execution. if (pending->HasError()) { SetResponseErrorResult(res, pending->GetError()); @@ -412,7 +411,9 @@ void HttpServer::DoHandleRun(const httplib::Request &req, pending->Execute(); break; default: - SetResponseErrorResult(res, "Unexpected PendingExecutionResult"); + SetResponseErrorResult( + res, StringUtil::Format("Unexpected PendingExecutionResult: %d", + exec_result)); return; } } @@ -488,7 +489,9 @@ void HttpServer::DoHandleRun(const httplib::Request &req, break; } default: - SetResponseErrorResult(res, "Unexpected PendingExecutionResult"); + SetResponseErrorResult( + res, StringUtil::Format("Unexpected PendingExecutionResult: %d", + exec_result)); break; } }