Skip to content

Allow saving occurrences with invalid context #71

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

Merged
merged 4 commits into from
Aug 28, 2024

Conversation

odarriba
Copy link
Contributor

This change updates how an occurrence is stored in order to validate if the context can be serialized to be stored on the database.

If the context cannot be serialized, we emit a warning log message and store an error as the context.

Extra tests have been added for the new functionality.

Note: This is a proposal. I think it may be a good idea but it adds a bit more of complexity on occurrence building. On the other hand, we avoid having issues which are invisible to our users by not storing them.

Closes #65 (again)

This change updates how an occurrence is stored in order to
validate if the context can be serialized to be stored on the
database.

If the context cannot be serialized, we emit a warning log message
and store an error as the context.
@odarriba odarriba requested a review from crbelaus August 27, 2024 20:06
@odarriba odarriba self-assigned this Aug 27, 2024
Copy link
Contributor

@crbelaus crbelaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great 👍

@odarriba odarriba merged commit 67ef9f7 into main Aug 28, 2024
3 checks passed
@odarriba odarriba deleted the allow-saving-occurrences-with-invalid-context branch August 28, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when setting a User struct in the error context
2 participants