mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
update request error handling
This commit is contained in:
parent
946728e54e
commit
0608a9ad3d
1 changed files with 8 additions and 2 deletions
|
|
@ -138,9 +138,15 @@ public:
|
|||
onResponse(std::move(buffer));
|
||||
}
|
||||
} else if (response == 0) {
|
||||
logger.error() << curl_easy_strerror(result) << " (" << url << ")";
|
||||
auto message = std::string(curl_easy_strerror(result));
|
||||
logger.error() << message << " (" << url << ")";
|
||||
if (onReject) {
|
||||
onReject(response, {});
|
||||
onReject(
|
||||
response,
|
||||
std::vector<char>(
|
||||
message.data(), message.data() + message.size()
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
logger.error()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue