Created
January 13, 2022 17:10
-
-
Save nferch/4cf758659710b1d626c0feb2222eb2bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/http/service.go b/http/service.go | |
index cd7f70d..e7776a1 100644 | |
--- a/http/service.go | |
+++ b/http/service.go | |
@@ -876,6 +876,9 @@ func (s *Service) handleExecute(w http.ResponseWriter, r *http.Request) { | |
if resultsErr != nil { | |
resp.Error = resultsErr.Error() | |
+ if results == nil { | |
+ http.Error(w, resultsErr.Error(), http.StatusInternalServerError) | |
+ } | |
} else { | |
resp.Results.ExecuteResult = results | |
} | |
@@ -965,6 +968,9 @@ func (s *Service) handleQuery(w http.ResponseWriter, r *http.Request) { | |
if resultsErr != nil { | |
resp.Error = resultsErr.Error() | |
+ if results == nil { | |
+ http.Error(w, resultsErr.Error(), http.StatusInternalServerError) | |
+ } | |
} else { | |
resp.Results.QueryRows = results | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment