aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.98k stars 1.06k forks source link

use curl error buffer for more informative error message #2912

Closed sbiscigl closed 7 months ago

sbiscigl commented 7 months ago

Issue #, if available: TBD

Description of changes:

Uses CURLOPT_ERRORBUFFER as a more informative source of error messages for network errors when encountered. if error buffer is not available falls back to old way, which is also the recommended curl method via the example in the error buffer documentation.

example error message before: "curlCode: 7, Couldn't connect to server"

after "Failed to connect to localhost port 443 after 1 ms: Couldn't connect to server"

Check all that applies:

Check which platforms you have built SDK on to verify the correctness of this PR.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.