Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

500 error returned by analytics endpoint #145

Closed
gardner opened this issue Aug 9, 2016 · 1 comment
Closed

500 error returned by analytics endpoint #145

gardner opened this issue Aug 9, 2016 · 1 comment

Comments

@gardner
Copy link
Member

gardner commented Aug 9, 2016

It looks like group_by_day used to be defined on the User model.

app[web.1]: Started OPTIONS "/api/v1/groups/56" for 103.23.18.14 at 2016-08-09 09:59:42 +0000
app[web.1]: Started OPTIONS "/api/v1/groups/56/analytics" for 103.23.18.14 at 2016-08-09 09:59:42 +0000
app[web.1]: Started GET "/api/v1/groups/56/analytics" for 103.23.18.14 at 2016-08-09 09:59:42 +0000
app[web.1]: Processing by AnalyticsController#group_report as JSON
app[web.1]:   Parameters: {"id"=>"56"}
heroku[router]: at=info method=GET path="/api/v1/groups/56/analytics" host=cobudget-beta-api.herokuapp.com request_id=012d2f34-df50-4a91-b69a-8d34496dc7ec fwd="103.23.18.14" dyno=web.1 connect=1ms service=84ms status=500 bytes=290
app[web.2]: Started GET "/api/v1/groups/56" for 103.23.18.14 at 2016-08-09 09:59:42 +0000
heroku[router]: at=info method=GET path="/api/v1/groups/56" host=cobudget-beta-api.herokuapp.com request_id=6ea9baf5-7d4f-476d-8107-6df833fd86c1 fwd="103.23.18.14" dyno=web.2 connect=0ms service=154ms status=200 bytes=1005
app[web.2]: Processing by GroupsController#show as JSON
app[web.2]:   Parameters: {"id"=>"56"}
app[web.2]: Completed 200 OK in 144ms (Views: 44.4ms | ActiveRecord: 14.8ms)
app[web.1]: Completed 500 Internal Server Error in 50ms (ActiveRecord: 29.5ms)
app[web.1]: 
app[web.1]: NoMethodError (undefined method `group_by_day' for #<User::ActiveRecord_Relation:0x007fd9ff320600>):
app[web.1]:   app/services/group_analytics_service.rb:24:in `cumulative_confirmed_member_count_per_day'
app[web.1]:   app/services/group_analytics_service.rb:15:in `report'
app[web.1]:   app/services/group_analytics_service.rb:6:in `report'
app[web.1]:   app/controllers/analytics_controller.rb:13:in `group_report'
app[web.1]: 
app[web.1]: 
@data-doge
Copy link
Contributor

fixed in #148

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

No branches or pull requests

2 participants