This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 30dae4be8a log errors without exceptions in query console (#11598)
30dae4be8a is described below
commit 30dae4be8a5e7accb7684da893aab08d59abee8d
Author: Johan Adami <[email protected]>
AuthorDate: Thu Sep 14 21:37:58 2023 -0400
log errors without exceptions in query console (#11598)
---
.../src/main/resources/app/utils/PinotMethodUtils.ts | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
b/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
index 1132630637..0650960530 100644
--- a/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
+++ b/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
@@ -273,7 +273,15 @@ const getQueryResults = (params) => {
// if sql api throws error, handle here
if(typeof queryResponse === 'string'){
exceptions = queryResponse;
- }
+ }
+ // if sql api returns a structured error with a `code`, handle here
+ if (queryResponse && queryResponse.code) {
+ if (queryResponse.error) {
+ exceptions = "Query failed with error code: " + queryResponse.code + "
and error: " + queryResponse.error;
+ } else {
+ exceptions = "Query failed with error code: " + queryResponse.code + "
but no logs. Please see controller logs for error.";
+ }
+ }
if (queryResponse && queryResponse.exceptions &&
queryResponse.exceptions.length) {
exceptions = queryResponse.exceptions as SqlException[];
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]