Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise Message Exception when displaying binary data
Fixes https://sentry.galaxyproject.org/share/issue/a8843884527f4e4089b32fd14a2f126d/: ``` UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 4: invalid start byte File "galaxy/web/framework/middleware/error.py", line 167, in __call__ app_iter = self.application(environ, sr_checker) File "galaxy/web/framework/middleware/statsd.py", line 29, in __call__ req = self.application(environ, start_response) File "/cvmfs/main.galaxyproject.org/venv/lib/python3.11/site-packages/paste/httpexceptions.py", line 635, in __call__ return self.application(environ, start_response) File "galaxy/web/framework/base.py", line 174, in __call__ return self.handle_request(request_id, path_info, environ, start_response) File "galaxy/web/framework/base.py", line 263, in handle_request body = method(trans, **kwargs) File "galaxy/webapps/galaxy/controllers/dataset.py", line 152, in display display_data, headers = data.datatype.display_data( File "galaxy/datatypes/sequence.py", line 785, in display_data "/dataset/large_file.mako", truncated_data=fh.read(max_peek_size), data=dataset File "<frozen codecs>", line 322, in decode ``` Which is a BAM file assigned to fastqsanger.gz
- Loading branch information