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

nil Recording :config causes error #15

Open
avescodes opened this issue Feb 14, 2014 · 0 comments
Open

nil Recording :config causes error #15

avescodes opened this issue Feb 14, 2014 · 0 comments
Labels

Comments

@avescodes
Copy link

Issue #142 resulted in a recording file with :config nil. When loading the Rendering page, having one or more files with a nil config caused a null exception. I'm looking for feedback before I submit a pull request.

A simple fix is to just filter out the recordings that don't have a name. The downside is that misconfigured recordings simply won't show up in the list, leaving the user to figure out why.

A better option IMO is to show any misconfigured recordings, perhaps as a second list on the Rendering page. As I was exploring this, I noticed the following:

  • :name option is redundant because it is just the name of the file.
  • if :name is ever changed (without a corresponding filename change), the file will never be linked to on the Rendering page and all kinds of weird loading dependencies can occur (e.g. file 1 loads file 2, file 2 loads file 1)
  • the recording name is duplicated; it is sent as the url and sent in the form params. That's why issue #142 still allowed the file to be created with the correct name, even though the config data in the form params was lost.

So, suggestions:

  • Submit recordings to a general url and get the recording name from the form params
  • Remove :name from the recording file and update code to just rely on the file name

Benefits:

  • Potentially catch recording data errors earlier (file creation will fail, instead of creating invalid files)
  • All files will be listed, even files that are invalid
  • When following a link to an invalid file, a proper error message will be displayed
  • Fewer changes will be required to list invalid files

Thoughts before I submit a pull request?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant