Skip to content

Events API does not raise an error when invalid YYYYMMDD strings are passed as before or after query string parameters #62

@tlamarre91

Description

@tlamarre91

To reproduce:

Make a request (with a valid Authorization header to this URL: https://5thsgreyhh.execute-api.us-east-2.amazonaws.com/prod/events?group=open-sgf&before=2024-01-16

Expected:

API returns a response like "invalid date string format; expected YYYYMMDD"

Observed:

The Lambda "parses" the before and after params in some weird incorrect way. If the incorrect parsing results in a valid datetime, the API returns a response based on that incorrectly parsed datetime. If it doesn't, we get a response like the following:

{
    "success": false,
    "error": {},
    "errorName": "RangeError",
    "errorMessage": "Invalid time value"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions