Skip to content

Instantly share code, notes, and snippets.

@jcuffe
Created October 30, 2012 06:28
Show Gist options
  • Select an option

  • Save jcuffe/3978623 to your computer and use it in GitHub Desktop.

Select an option

Save jcuffe/3978623 to your computer and use it in GitHub Desktop.
response from jane is not properly handled by either astro or uniblab
we got a payload from Elroy: {"type":"ride","subtype":"new","meta":{"fleets":[],"hail_protocol":"","priority":""},"content":{"id":"","passenger":{"id":"e74e133f-b6cc-43bd-9da7-b9956afee24b","name":"Jared"},"pickup_location":{"address_1":"816 Hamilton St","address_2":"","city":"Redwood City","state":"CA","country":"USA","postal_code":94063,"latitude":37.5,"longitude":-122.25},"drop_off_location":{"address_1":"816 Hamilton St","address_2":"","city":"Redwood City","state":"CA","country":"USA","postal_code":94063,"latitude":37.5,"longitude":-122.25},"requirements":{"party_size":"","mobility":"","preferred_fleets":[],"preferred_drivers":[]},"notes":""}}
DEBUG astro : Processing message: {:type=>"ride", :subtype=>"new", :meta=>{:fleets=>[], :hail_protocol=>"", :priority=>""}, :content=>{:id=>"", :passenger=>{:id=>"e74e133f-b6cc-43bd-9da7-b9956afee24b", :name=>"Jared"}, :pickup_location=>{:address_1=>"816 Hamilton St", :address_2=>"", :city=>"Redwood City", :state=>"CA", :country=>"USA", :postal_code=>94063, :latitude=>37.5, :longitude=>-122.25}, :drop_off_location=>{:address_1=>"816 Hamilton St", :address_2=>"", :city=>"Redwood City", :state=>"CA", :country=>"USA", :postal_code=>94063, :latitude=>37.5, :longitude=>-122.25}, :requirements=>{:party_size=>"", :mobility=>"", :preferred_fleets=>[], :preferred_drivers=>[]}, :notes=>""}}
DEBUG astro : hail request received
DEBUG astro : pulling passenger id: e74e133f-b6cc-43bd-9da7-b9956afee24b
DEBUG astro : got passenger: {:id=>"e74e133f-b6cc-43bd-9da7-b9956afee24b", :email=>"test@passenger.com", :telephone=>nil, :addresses=>[]}
DEBUG astro : >>>>>> sending jane {"type":"ride","subtype":"new","meta":{"fleets":[1],"priority":1,"hail_protocol":"rr"},"content":{"id":"1651256701007413869","notes":"","passenger":{"id":"e74e133f-b6cc-43bd-9da7-b9956afee24b","name":null,"phone":null,"email":"test@passenger.com"},"pickup_location":{"address_1":"816 Hamilton St","address_2":"","city":"Redwood City","state":"CA","postal_code":94063,"country":"USA","latitude":37.5,"longitude":-122.25},"drop_off_location":{"address_1":"816 Hamilton St","address_2":"","city":"Redwood City","state":"CA","postal_code":94063,"country":"USA","latitude":37.5,"longitude":-122.25},"requirements":{"party_size":"","mobility":"","preferred_fleets":[],"preferred_drivers":[]}}}
DEBUG astro : received a message from Jane:o:Uniblab::Error::Dat:
@type:
@contento:"Uniblab::Error::Data::Content:
@dataI" code:ETi???I"
T{I"nvaldata;rameters;essage;
TI"parameter;type;
TmessageI"Incorrect type: phone;
DEBUG astro : processing message (String):o:Uniblab::Error::Dat:
@type:
@contento:"Uniblab::Error::Data::Content:
@dataI" code:ETi???I"
T{I"nvaldata;rameters;essage;
TI"parameter;type;
TmessageI"Incorrect type: phone;
/Users/jared/repos/astro/src/jane_update.rb:22:in `process_message': undefined method `type' for #<Uniblab::Error::Data:0x007fd984a112a0> (NoMethodError)
from /Users/jared/repos/astro/src/jane_update.rb:16:in `initialize'
from /Users/jared/repos/astro/src/astro.rb:36:in `new'
from /Users/jared/repos/astro/src/astro.rb:36:in `block in setup_jane_connection'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amqp-0.9.8/lib/amqp/consumer.rb:122:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amqp-0.9.8/lib/amqp/consumer.rb:122:in `block in on_delivery'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amq-client-0.9.5/lib/amq/client/async/callbacks.rb:41:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amq-client-0.9.5/lib/amq/client/async/callbacks.rb:41:in `block in exec_callback'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amq-client-0.9.5/lib/amq/client/async/callbacks.rb:41:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amq-client-0.9.5/lib/amq/client/async/callbacks.rb:41:in `exec_callback'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amq-client-0.9.5/lib/amq/client/async/consumer.rb:203:in `handle_delivery'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amq-client-0.9.5/lib/amq/client/async/consumer.rb:249:in `block in <class:Consumer>'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amq-client-0.9.5/lib/amq/client/async/adapter.rb:551:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amq-client-0.9.5/lib/amq/client/async/adapter.rb:551:in `receive_frameset'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amq-client-0.9.5/lib/amq/client/async/adapter.rb:525:in `receive_frame'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/amq-client-0.9.5/lib/amq/client/async/adapters/event_machine.rb:325:in `receive_data'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
from /usr/local/rvm/gems/ruby-1.9.3-p194@astro/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
from bin/astro.rb:48:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment