Skip to content
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

Add some safeties around the charset-detection and transliteration #16376

Merged
merged 2 commits into from
Feb 27, 2025

Conversation

uberbrady
Copy link
Collaborator

Should prevent some rollbars we get around iconv() - this puts a try/catch around the iconv() call and returns a new translation string for the error which hopefully will be informative for the end-user as they're trying to upload a CSV file.

I also added a test with a very gnarly fake WINDOWS-1251 string in it to trigger the new transliteration-failure mode.

Copy link

what-the-diff bot commented Feb 27, 2025

PR Summary

  • Enhanced Error Handling for Encoding Transliteration
    Improved the process of error handling in our import features. We're now able to log any issues encountered, as well as manage and respond to specific situations where transliteration may fail.

  • Added New Error Message
    Introduces a new message to alert users when transliteration failure is caused due to invalid characters.

  • New Test Case for Error Handling
    We've added an additional test that specifically checks how the system manages incorrect encoding inputs. This test ensures the system responds appropriately to such situations, which will help maintain the robustness of the application in the face of potential encoding errors.

@snipe snipe merged commit 3928c8a into snipe:develop Feb 27, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants