Boost C++ Libraries

PrevUpHomeNext

Function http_status_for

boost::taar::http_status_for — The HTTP status a failure maps to by default.

Synopsis

// In header: <boost/taar/core/error.hpp>


boost::beast::http::status http_status_for(failure const & f);

Description

  • Request-related codes of error (argument not found or ambiguous, invalid argument, request, URL, content type, cookie, boolean or number format, constraint violated): 400 Bad Request.

  • boost::beast::http::error::body_limit: 413 Payload Too Large.

  • boost::beast::http::error::header_limit: 431 Request Header Fields Too Large.

  • boost::beast::error::timeout (a request header or body that did not arrive in time): 408 Request Timeout.

  • Anything else: 500 Internal Server Error.

Only the outermost code is consulted.


PrevUpHomeNext