Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw an error when quickwit is responding a status_code >= 400 #29

Closed
idrissneumann opened this issue Nov 24, 2023 · 1 comment
Closed

Comments

@idrissneumann
Copy link
Collaborator

Today with the #23 PR, we got this piece of code to improve the debugging:

if res.StatusCode >= 400 {
		jsonResponseBody, _ := json.Marshal(res.Body)
		jsonQueryParam, _ := json.Marshal(queryParams)
		jsonRequestBody, _ := json.Marshal(r.Requests)
		c.logger.Error("Error on multisearch: statusCode = " + strconv.Itoa(res.StatusCode) + ", responseBody = " + string(jsonResponseBody) + ", queryParam = " + string(jsonQueryParam) + ", requestBody = " + string(jsonRequestBody))
	}

Improve this by throwing directly an error, you'll probably have to fix some unit tests.

@idrissneumann
Copy link
Collaborator Author

It's a duplicate of #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant