When uploading data a 413 should be returned when exceeding the value in bytes. This configuration only valid when parsing form data, and not an arbitrary json request body (See https://github.com/pallets/flask/issues/2690). Gunicorn does not have a way to handle this either. Although inefficient we will have to manually check the header and return a response, that way we can respond with an error in the same json format for consistency.
When uploading data a 413 should be returned when exceeding the value in bytes. This configuration only valid when parsing form data, and not an arbitrary json request body (See https://github.com/pallets/flask/issues/2690). Gunicorn does not have a way to handle this either. Although inefficient we will have to manually check the header and return a response, that way we can respond with an error in the same json format for consistency.