Haproxy error 413 paylod too large

Unfortunately haproxy documentation does not provide enough information about 413 response code.

In haproxy documentation it is specified that:

Currently, HAProxy is capable of
          generating codes 200, 400, 401, 403, 404, 405, 407, 408, 410,
          413, 425, 429, 500, 501, 502, 503, and 504.

But further down in https://www.haproxy.com/documentation/haproxy-configuration-manual/latest/#1.4.1 it is specified only:

HAProxy may emit the following status codes by itself :
....
   410  when the requested resource is no longer available and will not
        be available again
   500  when HAProxy encounters an unrecoverable internal error, such as a
        memory allocation failure, which should never happen
....

And information when 413 is generated is not provided. However haproxy can and will return 413 in some cases:

2024 IP https~ https/<NOSRV> -1/-1/-1/-1/0 413 0 - - PR-- 10/10/0/0/0 0/0 "<BADREQ>"

The only way to find more about 413 code is to look at source code of haproxy where more information is provided with configuration option for potential fix:

        /* Reject HTTP/1.0 GET/HEAD/DELETE requests with a payload except if
         * accept_payload_with_any_method global option is set.
         *There is a payload if the c-l is not null or the the payload is
         * chunk-encoded.  A parsing error is reported but a A
         * 413-Payload-Too-Large is returned instead of a 400-Bad-Request.
         */
        if (!accept_payload_with_any_method &&
            !(h1m->flags & (H1_MF_RESP|H1_MF_VER_11)) &&
            (((h1m->flags & H1_MF_CLEN) && h1m->body_len) || (h1m->flags & H1_MF_CHNK)) &&
            (h1sl.rq.meth == HTTP_METH_GET || h1sl.rq.meth == HTTP_METH_HEAD || h1sl.rq.meth == HTTP_METH_DELETE)) {
                h1s->flags |= H1S_F_PARSING_ERROR;
                htx->flags |= HTX_FL_PARSING_ERROR;
                h1s->h1c->errcode = 413;