MassProspecting / docs

Public documentation, roadmap and issue tracker of MassProspecting
http://doc.massprospecting.com/
1 stars 0 forks source link

glitch inserting an outreach thru API #354

Closed leandrosardi closed 3 days ago

leandrosardi commented 5 days ago
[27] pry(#<Mass::Copilot>)> outreach = Mass::Outreach.upsert(outreach_descriptor)
RuntimeError: Error calling upsert endpoint: undefined method `[]' for nil:NilClass

            if h['profile']['leased']
                           ^^^^^^^^^^
/home/blackstack/code1/slave/extensions/mass.subaccount/models/skeleton/outreach.rb:803:in `upsert'
/home/blackstack/code1/slave/views/api1.0/upsert.erb:14:in `__tilt_913121300'
/usr/local/rvm/gems/ruby-3.1.2/gems/tilt-2.4.0/lib/tilt/template.rb:207:in `bind_call'
/usr/local/rvm/gems/ruby-3.1.2/gems/tilt-2.4.0/lib/tilt/template.rb:207:in `evaluate'
/usr/local/rvm/gems/ruby-3.1.2/gems/tilt-2.4.0/lib/tilt/template.rb:102:in `render'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:863:in `render'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:711:in `erb'
/home/blackstack/code1/slave/app.rb:667:in `block in <main>'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1697:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1697:in `block in compile!'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1030:in `block (3 levels) in route!'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1049:in `route_eval'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1030:in `block (2 levels) in route!'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1078:in `block in process_route'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1076:in `catch'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1076:in `process_route'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1028:in `block in route!'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1025:in `each'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1025:in `route!'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1147:in `block in dispatch!'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `block in invoke'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `catch'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `invoke'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1142:in `dispatch!'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:956:in `block in call!'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `block in invoke'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `catch'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `invoke'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:956:in `call!'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:945:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/rack-contrib-2.3.0/lib/rack/contrib/try_static.rb:35:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/rack-contrib-2.3.0/lib/rack/contrib/try_static.rb:35:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/rack-contrib-2.3.0/lib/rack/contrib/try_static.rb:35:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/rack-contrib-2.3.0/lib/rack/contrib/try_static.rb:35:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/rack-contrib-2.3.0/lib/rack/contrib/try_static.rb:35:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/rack-2.2.10/lib/rack/session/abstract/id.rb:266:in `context'
/usr/local/rvm/gems/ruby-3.1.2/gems/rack-2.2.10/lib/rack/session/abstract/id.rb:260:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/rack-2.2.10/lib/rack/logger.rb:17:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/rack-2.2.10/lib/rack/common_logger.rb:38:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:255:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:248:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/rack-2.2.10/lib/rack/head.rb:12:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/rack-2.2.10/lib/rack/method_override.rb:24:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/show_exceptions.rb:22:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:218:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:2004:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1564:in `block in call'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1780:in `synchronize'
/usr/local/rvm/gems/ruby-3.1.2/gems/sinatra-2.2.4/lib/sinatra/base.rb:1564:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/puma-5.6.9/lib/puma/configuration.rb:252:in `call'
/usr/local/rvm/gems/ruby-3.1.2/gems/puma-5.6.9/lib/puma/request.rb:77:in `block in handle_request'
/usr/local/rvm/gems/ruby-3.1.2/gems/puma-5.6.9/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
/usr/local/rvm/gems/ruby-3.1.2/gems/puma-5.6.9/lib/puma/request.rb:76:in `handle_request'
/usr/local/rvm/gems/ruby-3.1.2/gems/puma-5.6.9/lib/puma/server.rb:443:in `process_client'
/usr/local/rvm/gems/ruby-3.1.2/gems/puma-5.6.9/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
from /home/leandro/.rvm/gems/ruby-3.1.2/gems/blackstack-core-1.2.28/lib/functions.rb:247:in `upsert'