Skip to content
Snippets Groups Projects
Commit b99f5fd6 authored by Konstantinos Sideris's avatar Konstantinos Sideris
Browse files

Increase the range of accepted status codes

parent 8dca9507
No related branches found
No related tags found
No related merge requests found
......@@ -473,8 +473,10 @@ mtx::http::Client::create_session(HeadersCallback<Response> callback)
const auto body = client::utils::decompress(
boost::iostreams::array_source{response.body().data(), response.body().size()},
header["Content-Encoding"].to_string());
const int status_code = static_cast<int>(response.result());
if (response.result() != boost::beast::http::status::ok) {
// We only count 2xx status codes as success.
if (status_code < 200 || status_code >= 300) {
client_error.status_code = response.result();
// Try to parse the response in case we have an endpoint that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment