diff --git a/gh/branches.hxx b/gh/branches.hxx index 31895822..0b57ac4b 100644 --- a/gh/branches.hxx +++ b/gh/branches.hxx @@ -97,7 +97,7 @@ namespace gh { result_handler({all_branches.begin(), all_branches.end()}); } } else { - throw std::runtime_error(resp.url + " failed with error: " + std::string(resp.error)); + throw std::runtime_error(resp.url + " failed with error: " + std::string(resp.error) + " - " + resp.text); } }; diff --git a/gh/refs.hxx b/gh/refs.hxx index dbfa772b..5f59565e 100644 --- a/gh/refs.hxx +++ b/gh/refs.hxx @@ -93,7 +93,7 @@ namespace gh { auto response_handler = [&](auto&& resp) { // sometimes, on very large repositories like GRPC, github.com seems to struggle, // but it's able to respond the query in two slices by looking up refs and then heads separately - if(resp.status_code == 502 && filter == filter_refs::ALL) { + if((resp.status_code == 502 || resp.status_code == 504) && filter == filter_refs::ALL) { git_data::refs manual_aggregation{}; @@ -113,7 +113,7 @@ namespace gh { result_handler(pre::json::from_json(resp.text)); } else { throw std::runtime_error( "err : "s + std::string(resp.error) + "status: "s - + std::to_string(resp.status_code) + " accessing : "s + url ); + + std::to_string(resp.status_code) + " accessing : "s + url + " --- " + resp.text); } };