Skip to content

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

@idrissneumann

Description

@idrissneumann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions