Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Bad Request: E.g. Request size exceeds limit #36

Open
ismailsunni opened this issue Jul 25, 2024 · 0 comments
Open

Handle Bad Request: E.g. Request size exceeds limit #36

ismailsunni opened this issue Jul 25, 2024 · 0 comments

Comments

@ismailsunni
Copy link
Collaborator

When sending a json specification that is more than the size limit, we get a HTTP error in HTML. This will cause a parsing error that expect a JSON. We should be able to handle this issue and give proper error message.

<!doctype html>
<html lang="en">
    <head>
        <title>HTTP Status 400 – Bad Request</title>
        <style type="text/css">
            body {
                font-family: Tahoma,Arial,sans-serif;
            }

            h1, h2, h3, b {
                color: white;
                background-color: #525D76;
            }

            h1 {
                font-size: 22px;
            }

            h2 {
                font-size: 16px;
            }

            h3 {
                font-size: 14px;
            }

            p {
                font-size: 12px;
            }

            a {
                color: black;
            }

            .line {
                height: 1px;
                background-color: #525D76;
                border: none;
            }
        </style>
    </head>
    <body>
        <h1>HTTP Status 400 – Bad Request</h1>
        <hr class="line"/>
        <p>
            <b>Type</b>
            Status Report
        </p>
        <p>
            <b>Message</b>
            Request size exceeds limit
        </p>
        <p>
            <b>Description</b>
            The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
        </p>
        <hr class="line"/>
        <h3>Apache Tomcat/9.0.80</h3>
    </body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant