launchdarkly / c-client-sdk

LaunchDarkly Client-side SDK for C/C++
Other
8 stars 13 forks source link

Log curl's error code if curl_easy_perform fails. #79

Closed arkhaix closed 2 years ago

arkhaix commented 2 years ago

Requirements

Related issues

We've run into issues with SSL certificate errors that took longer to track down than they should have because the underlying CURLcode was obscured. LDi_bgfeaturestreamer attempts to interpret these responses as http codes and log things in plain English, but it doesn't cover the range of curl codes, instead just logging all of them as streaming failed with recoverable error, backing off.

Describe the solution you've provided

Any failure from curl_easy_perform in LDi_readstream will log the raw CURLcode to the debug log stream.

Describe alternatives you've considered

LDi_bgfeaturestreamer could be modified to interpret these codes, but that function looks like it's attempting to log higher level issues and http response codes in plain English.

Additional context

cwaldren-ld commented 2 years ago

Thanks @arkhaix, and sorry about the time you spent debugging. This is a useful improvement.

Filed internally as 158470.

cwaldren-ld commented 2 years ago

Hi @arkhaix, this should be fixed in 2.4.9.