-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[EventsBridge] Add validation for malformed Detail value #11990
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
Conversation
2f8e2d0
to
1438fdb
Compare
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 1h 8m 22s ⏱️ - 41m 17s Results for commit c49d25f. ± Comparison against base commit 6df4dbc. This pull request removes 1547 and adds 4 tests. Note that renamed tests count towards both.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch :)
) | ||
@pytest.mark.parametrize( | ||
"detail", | ||
["NotJSON", "[]", "{{}", json.dumps("NotJSON")], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice also testing for plain string - was a bit surprised that this also results in malformed error but it is correct :)
Motivation
This PR validates an event entry's
Detail
field to ensure it is a valid JSON object.From the
PutEventsRequestEntry
AWS docs:In addition to the
PutEventsResultEntry
AWS docs for the error code:Changes
validate_event
that returnsMalformedDetail
error type response.