intercom / intercom-ruby

Ruby bindings for the Intercom API
https://developers.intercom.io/reference
MIT License
277 stars 134 forks source link

The error of type '' is not recognized. It occurred with the message: Server Error and http_code: '500' #403

Closed kafejo closed 6 years ago

kafejo commented 6 years ago

Version info

Expected behavior

Iterate over all users

Actual behavior

Occasional 500 error of '' type

Steps to reproduce

  1. Iterate over users
    intercom.users.scroll.each do |user|
    ...
    end
    1. Wait

Logs

/Users/aleskocur/.rvm/gems/ruby-2.3.0/gems/intercom-3.5.23/lib/intercom/request.rb:171:in `raise_application_errors_on_failure': The error of type '' is not recognized. It occurred with the message: Server Error and http_code: '500'. Please contact Intercom with these details. (Intercom::UnexpectedError)
    from /Users/aleskocur/.rvm/gems/ruby-2.3.0/gems/intercom-3.5.23/lib/intercom/request.rb:104:in `parse_body'
    from /Users/aleskocur/.rvm/gems/ruby-2.3.0/gems/intercom-3.5.23/lib/intercom/request.rb:72:in `block in execute'
    from /Users/aleskocur/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/net/http.rb:853:in `start'
    from /Users/aleskocur/.rvm/gems/ruby-2.3.0/gems/intercom-3.5.23/lib/intercom/request.rb:67:in `execute'
    from /Users/aleskocur/.rvm/gems/ruby-2.3.0/gems/intercom-3.5.23/lib/intercom/client.rb:113:in `execute_request'
    from /Users/aleskocur/.rvm/gems/ruby-2.3.0/gems/intercom-3.5.23/lib/intercom/client.rb:89:in `get'
    from /Users/aleskocur/.rvm/gems/ruby-2.3.0/gems/intercom-3.5.23/lib/intercom/scroll_collection_proxy.rb:41:in `block in each'
    from /Users/aleskocur/.rvm/gems/ruby-2.3.0/gems/intercom-3.5.23/lib/intercom/scroll_collection_proxy.rb:37:in `loop'
    from /Users/aleskocur/.rvm/gems/ruby-2.3.0/gems/intercom-3.5.23/lib/intercom/scroll_collection_proxy.rb:37:in `each'
theandrewykim commented 6 years ago

@kafejo - How often are you running into these issues? The errors you're seeing seem to indicate this isn't an issue with the Ruby wrapper specifically, but more with the API in general. Do you mind logging into Intercom and writing into our messenger so our support team can take a look into this? Emailing team@intercom.com works as well 👍