CopperEgg / copperegg-ruby

CopperEgg Ruby Gem
MIT License
2 stars 4 forks source link

JSON parse errors with gem (Ruby 1.9.3) #5

Open jjeffers opened 11 years ago

jjeffers commented 11 years ago

I've also seen this:

/usr/local/lib/ruby/gems/1.9.1/gems/json_pure-1.7.7/lib/json/pure/parser.rb:138:in `parse': source 'HTTP Basic: Access d' not in JSON! (JSON::ParserError)
    from /usr/local/lib/ruby/gems/1.9.1/gems/json_pure-1.7.7/lib/json/common.rb:155:in `parse'
    from /usr/local/lib/ruby/gems/1.9.1/gems/copperegg-0.6.1/lib/copperegg/mixins/persistence.rb:78:in `save'
    from /var/www/rabbitmq-copperegg-metrics/rabbitmq-copperegg-metrics.rb:15:in `<main>'
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]
rdickey commented 11 years ago

Thanks for the report! It looks like we're trying to parse an "Access denied" string, rather than handling the error more intuitively. Does this only happen when the API key is incorrect?

jjeffers commented 11 years ago

I'm not sure but I'll see if that changes with a different key.

On Thu, Jul 18, 2013 at 3:39 PM, Ross Dickey notifications@github.comwrote:

Thanks for the report! It looks like we're trying to parse an "Access denied" string, rather than handling the error more intuitively. Does this only happen when the API key is incorrect?

— Reply to this email directly or view it on GitHubhttps://github.com/CopperEgg/copperegg-ruby/issues/5#issuecomment-21209023 .

James Jeffers jdjeffers@gmail.com http://codeprovidence.com/ http://www.linkedin.com/in/jamesjeffers