microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
7.96k stars 1.65k forks source link

cpprestsdk error reporing #1083

Open mr-MOD opened 5 years ago

mr-MOD commented 5 years ago

I'd like to ask why library error reporting is so inconsistent? e.g.: https://github.com/Microsoft/cpprestsdk/pull/563

Also there are different error codes for same problems on different operating systems Like for DNS resolution failure there is specific code from WinHTTP, but on Linux, it is reported as EPERM, that is so strange.

Connection timeout is reported with ECANCELLED error code, that is also unexpected.

This library probably have to have it's own set of error codes for most well-known failures, and additionally report system specific codes.

AndreasGeisler commented 9 months ago

I also advocate for an own set of error codes!