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

Visualizations 500 in production #13

Closed
jure opened this issue Sep 1, 2014 · 5 comments · Fixed by #25
Closed

Visualizations 500 in production #13

jure opened this issue Sep 1, 2014 · 5 comments · Fixed by #25
Labels

Comments

@jure
Copy link
Contributor

jure commented Sep 1, 2014

Just stumbled on this during development. For example: http://almreports.plos.org/reports/metrics/13743

2014-09-01 22:34:09.185 [FATAL] NoMethodError (undefined method `inject' for nil:NilClass):
  lib/chart_data.rb:186:in `generate_data_for_usage_chart'
  app/controllers/reports_controller.rb:123:in `visualizations'
  app/controllers/application_controller.rb:114:in `save_session_dois' (pid:3564)

Will take a look tomorrow.

@jure jure added the bug label Sep 1, 2014
@mfenner
Copy link
Member

mfenner commented Sep 1, 2014

From looking at production.log I know that there are occasional errors like this. One of the nicest Ruby books I have read recently is https://pragprog.com/book/ager/exceptional-ruby by Avdi Grimm. He goes into great detail how to handle nils, wrong classes, etc., using a very interesting, proactive approach.

@jure
Copy link
Contributor Author

jure commented Sep 5, 2014

Still haven't looked into this one. @mfenner: Is this same/related to #24?

@mfenner
Copy link
Member

mfenner commented Sep 5, 2014

This is not directly related, but is the same idea: properly handle missing data in the response from the ALM API. Let me know if you want me to do anything (as I have a pretty good idea what comes from the ALM API, and what might have changed).

@mfenner
Copy link
Member

mfenner commented Sep 5, 2014

With the fixes in the pull request the report in your example no longer produces an error, but I'm not sure I have covered all possible scenarios.

@jure jure closed this as completed in #25 Sep 5, 2014
@jure
Copy link
Contributor Author

jure commented Sep 5, 2014

🎉

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

Successfully merging a pull request may close this issue.

2 participants