Skip to content

Commit 70b105b

Browse files
committed
Issue #22: add log when quickwit return an error
1 parent fad95cb commit 70b105b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

build_and_start.sh

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
npm install
44
npm run build
55
mage -v
6+
go test -v ./pkg/...
67
docker-compose up --build --force-recreate

pkg/quickwit/client/client.go

+5
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ func (c *baseClientImpl) ExecuteMultisearch(r *MultiSearchRequest) (*MultiSearch
166166

167167
c.logger.Debug("Received multisearch response", "code", res.StatusCode, "status", res.Status, "content-length", res.ContentLength)
168168

169+
if res.StatusCode >= 400 {
170+
jsonBody, _ := json.Marshal(res.Body)
171+
c.logger.Error("Error on multisearch: status_code = " + strconv.Itoa(res.StatusCode) + ", responses = " + string(jsonBody))
172+
}
173+
169174
start := time.Now()
170175
c.logger.Debug("Decoding multisearch json response")
171176

0 commit comments

Comments
 (0)