Skip to content

[Migrated] Handling non-dict SNS messages #932

Closed as not planned
Closed as not planned
@jneves

Description

@jneves

Originally from: Miserlou/Zappa#2198 by piotrdrazikowski

Description

The main SNS message handler incorrectly assumes that every message that was parsed using json.loads() without throwing an exception is of dict type, and then uses dict methods like .get() on the parsed object which eventually leads to a crash. In our case this has prevented us from sending a list of dicts, but there's more examples. This PR fixes it by handling the AttributeError exception

GitHub Issues

Miserlou/Zappa#1466
Miserlou/Zappa#1864

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-closed[Bot] Closed, details in commentsno-activity[Bot] Closing soon if no new activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions