diff --git a/services/httpd/handler.go b/services/httpd/handler.go
index <HASH>..<HASH> 100644
--- a/services/httpd/handler.go
+++ b/services/httpd/handler.go
@@ -341,6 +341,11 @@ func (h *Handler) serveQuery(w http.ResponseWriter, r *http.Request, user *meta.
 		if l == 0 {
 			resp.Results = append(resp.Results, r)
 		} else if resp.Results[l-1].StatementID == r.StatementID {
+			if r.Err != nil {
+				resp.Results[l-1] = r
+				continue
+			}
+
 			cr := resp.Results[l-1]
 			rowsMerged := 0
 			if len(cr.Series) > 0 {
Have an error overwrite previous results when aggregating results in the HTTP handler

It's possible for a single query to send multiple results that get
aggregated in the HTTP handler. If an earlier result passed in data and
a later result had an error, the error would be ignored.

Now an error for a statement will overwrite any previous results for
that statement.