Skip to content

Incorrect StatusCode causing monitoring to flag #826

@iDVB

Description

@iDVB

We're seeing a ton of error alerts in this function. At closer inspection we see that its simply when a url is referenced without a required querystring parameter. Eg. "url" or "w". Currently the resulting statusCode is "500" which is why our Monitoring is flagging it.

Shouldn't this be a 4xx series error code? Likely 400 Bad Request ?

The HTTP 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, or deceptive request routing).

Examples

  • StatusCode: 500 "url" parameter is required
  • StatusCode: 500 "w" parameter (width) is required

NextJs correctly marks these as "400" errors (not 500)

Image

While OpenNext, marks them as 500

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions