Skip to content

Report should sanitize the event before JSON encoding #21

@liwp

Description

@liwp

In 0.3.0 Corax will report any event JSON encoding errors to Sentry. This will allow app developer at least to notice the errors and hopefully deal with them. The downside is that the original error event has already been lost, so the developer won't be able to even diagnose the original error until they've fixed the JSON encoding issue. Also, in some cases working out where a non-serializable object is coming from is difficult and it is tedious to remove those objects from the error report.

Instead Corax should sanitize the event by walking the event map and converting anything that Cheshire will not encode to a string with str. Things that Cheshire will encode are types in cheshire.core/generate and anything that satisfies cheshire.generate/JSONable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions