-
Notifications
You must be signed in to change notification settings - Fork 51
Labels
Description
A user registered a JSON file as a CbrainFileList, even though it wasn't one, then proceeded to attempt to launch a task with it. Normally, the task launcher use CbrainFileLists to generate task arrays. Here, because the content was wrong (JSON), the interface crashed. Stack trace:
.../lib/ruby/2.7.0/csv/parser.rb:923:in `parse_quotable_robust'
(10 stack levels not shown here)
.../lib/ruby/2.7.0/csv.rb:686:in `parse'
.../installed-plugins/userfiles/csv_file.rb:163:in `parse_file_content_as_csv'
.../installed-plugins/userfiles/csv_file.rb:149:in `create_csv_array'
.../installed-plugins/userfiles/cbrain_file_list.rb:83:in `cached_csv_array'
.../installed-plugins/userfiles/cbrain_file_list.rb:105:in `ordered_raw_ids'
.../installed-plugins/cbrain_task/boutiques_task/views/_form_js.html.erb:38:in `block in _app_views_tasks_cbrain_plugins_installed_plugins_cbrain_task_boutiques_task_views__form_js_html_erb___850980510956241561_4078380'
.../installed-plugins/cbrain_task/boutiques_task/views/_form_js.html.erb:36:in `map'
.../installed-plugins/cbrain_task/boutiques_task/views/_form_js.html.erb:36:in `_app_views_tasks_cbrain_plugins_installed_plugins_cbrain_task_boutiques_task_views__form_js_html_erb___850980510956241561_4078380'
The launcher should trap such exceptions and return a better error message to the user.