Skip to content

Commit

Permalink
Debug NoMethodError
Browse files Browse the repository at this point in the history
2024-11-24T17:33:21.507225809Z app[web.1]: 172.17.0.1 - - [24/Nov/2024:17:33:21 +0000] "POST /webhook HTTP/1.1" 204 - 0.0095
2024-11-25T16:29:09.740082605Z app[web.1]: 2024-11-25 16:29:09 - NoMethodError - undefined method `values' for an instance of Array:
2024-11-25T16:29:09.743588499Z app[web.1]:
2024-11-25T16:29:09.743601223Z app[web.1]: 	            meta["value"].each { |v| v.values.each { |v| ids += Array(v["value"]) } }
2024-11-25T16:29:09.743607354Z app[web.1]: 	                                      ^^^^^^^
2024-11-25T16:29:09.743612193Z app[web.1]: 	Did you mean?  values_at
2024-11-25T16:29:09.743616762Z app[web.1]: 	/app/lib/webhook.rb:126:in `block (3 levels) in product_ids'
2024-11-25T16:29:09.743646748Z app[web.1]: 	/app/lib/webhook.rb:126:in `each'
2024-11-25T16:29:09.743650455Z app[web.1]: 	/app/lib/webhook.rb:126:in `block (2 levels) in product_ids'
2024-11-25T16:29:09.743653351Z app[web.1]: 	/app/lib/webhook.rb:124:in `each'
2024-11-25T16:29:09.743656106Z app[web.1]: 	/app/lib/webhook.rb:124:in `block in product_ids'
2024-11-25T16:29:09.743658961Z app[web.1]: 	/app/lib/webhook.rb:122:in `each'
2024-11-25T16:29:09.743661706Z app[web.1]: 	/app/lib/webhook.rb:122:in `product_ids'
2024-11-25T16:29:09.743664431Z app[web.1]: 	/app/lib/webhook.rb:107:in `block in mapping_id_for'
2024-11-25T16:29:09.743667166Z app[web.1]: 	/app/lib/webhook.rb:106:in `each'
2024-11-25T16:29:09.743670342Z app[web.1]: 	/app/lib/webhook.rb:106:in `map'
2024-11-25T16:29:09.743673158Z app[web.1]: 	/app/lib/webhook.rb:106:in `mapping_id_for'
2024-11-25T16:29:09.743675924Z app[web.1]: 	/app/lib/webhook.rb:73:in `member_params'
2024-11-25T16:29:09.743678669Z app[web.1]: 	/app/lib/webhook.rb:25:in `handle!'
2024-11-25T16:29:09.743681394Z app[web.1]: 	/app/lib/webhook.rb:14:in `handle!'
2024-11-25T16:29:09.743684109Z app[web.1]: 	/app/app.rb:24:in `block in <class:App>'
  • Loading branch information
thibaudgg committed Nov 25, 2024
1 parent e7da410 commit 82bc074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class App < Sinatra::Base
logger.info payload
logger.info member_params
logger.info "#{e.class} - #{e.message}"
rescue TypeError => e
rescue TypeError, NoMethodError => e
logger.info payload
logger.info "#{e.class} - #{e.message}"
end
Expand Down

0 comments on commit 82bc074

Please sign in to comment.