Skip to content

Fix crash on error detail page when using MySQL/MariaDB #151

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

phihos
Copy link
Contributor

@phihos phihos commented May 4, 2025

Instead of using {:array, :string} for the :breadcrumbs field in ErrorTracker.Occurrence we use a new custom field type ErrorTracker.Types.StringArray.
It uses Jason to decode arrays when retrieving data from MySQL/MariaDB. Therefore it works very similarly to the :array type but without crashing on retrieval.
This fix does not make a schema migration necessary. An additional test module ErrorTracker.StoreFetchTest was implemented to avoid regreessions in the future.

Fixes #150.

@phihos phihos force-pushed the fix-bug-150 branch 9 times, most recently from bc070c2 to b6b143c Compare May 4, 2025 13:53
@phihos
Copy link
Contributor Author

phihos commented May 4, 2025

Ok, done refactoring now. Tests pass and code looks good to me at least.

Instead of using `{:array, :string}` for the `:breadcrumbs` field in `ErrorTracker.Occurrence` we use a new custom field type `ErrorTracker.Types.StringArray`.
It uses `Jason` to decode arrays when retrieving data from MySQL/MariaDB. Therefore it works very similarly to the `:array` type but without crashing on retrieval.
This fix does not make a schema migration necessary. An additional test module `ErrorTracker.StoreFetchTest` was implemented to avoid regreessions in the future.

Fixes elixir-error-tracker#150.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Field Occurrence.breadcrumbs is broken for MySQL/MariaDB
1 participant