You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When restclient-cpp encounters an error, generally the error (or "status") code is returned in the `Response` (see
180
+
[Response struct in restclient.h](https://github.com/mrtazz/restclient-cpp/blob/master/include/restclient-cpp/restclient.h)). This error code can be either
181
+
an [HTTP error code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status), or if a lower-level cURL error was encountered, it may be
182
+
a [CURLCode](https://curl.haxx.se/libcurl/c/libcurl-errors.html). Currently, libcurl only defines 92 error codes, which means
183
+
there is no overlap between cURL error codes and HTTP response codes (which start at 1xx). However, if in the future, libcurl defines more than 99
184
+
error codes, meaning that cURL errors overlap with the HTTP 1xx class of responses, restclient-cpp will return a -1 if the CURLCode is 100 or higher.
185
+
In this case, callers can use `GetInfo().lastRequest.curlCode` to inspect the actual cURL error.
186
+
178
187
## Thread Safety
179
188
restclient-cpp leans heavily on libcurl as it aims to provide a thin wrapper
180
189
around it. This means it adheres to the basic level of thread safety [provided
0 commit comments