On Sat, May 20, 2017 at 3:12 AM, Bjorn Reese via Boost
When I perform an asynchronous HTTP operation that returns an error_code then I prefer that the error_code contains a unified response, i.e. an HTTP status code, a system error code (e.g. network problem), or an internal library error code.
A nice thing about HTTP (if there is any such thing) is that the HTTP "message" can be modeled as a self contained object. The low-level result of the asynchronous operation (for example boost::asio::error::connection_reset) reflects metadata about the HTTP message and should not be part of that container. However, the status code is part of the message and therefore should be part of the container. I do not think it should be treated as metadata, nor represented using error_code.