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

fix(worker): Add test and character set detection for non-utf8 files #2965

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

nellh
Copy link
Contributor

@nellh nellh commented Jan 4, 2024

The worker would attempt to decode everything as UTF-8 and crash if a file could not be decoded as UTF-8. While BIDS requires most files to be UTF-8, it's useful for OpenNeuro to serve them and leave warnings/errors about invalid character sets to validation.

Fixes #2949 and uses the file causing issues there for the test.

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (da98f12) 64.91% compared to head (3337ffc) 64.91%.
Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2965   +/-   ##
=======================================
  Coverage   64.91%   64.91%           
=======================================
  Files         378      379    +1     
  Lines       24317    24320    +3     
  Branches      878      877    -1     
=======================================
+ Hits        15785    15787    +2     
- Misses       8532     8533    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nellh nellh merged commit 34d3991 into master Jan 4, 2024
7 checks passed
@nellh nellh deleted the fix/non-utf8-file-crash branch January 4, 2024 19:49
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.

File display fails with "can't convert undefined to object"
1 participant