method-inc / bamboozled

Bamboozled wraps the BambooHR API without the use of Rails dependencies.
MIT License
44 stars 50 forks source link

client.employee.dependents(id) always returns an error #38

Closed tilo closed 6 years ago

tilo commented 7 years ago

Given a valid BambooHR employee ID, we get an error:

>  bamboohr_client.employee.dependents( 75 )
MultiXml::ParseError: 1:1: FATAL: Start tag expected, '<' not found
  from /myapp/ruby/2.3/gems/multi_xml-0.6.0/lib/multi_xml/parsers/nokogiri.rb:16:in `parse'
  from /myapp/ruby/2.3/gems/multi_xml-0.6.0/lib/multi_xml.rb:146:in `parse'
  from /myapp/ruby/2.3/gems/bamboozled-0.1.0/lib/bamboozled/api/base.rb:45:in `rescue in request'
  from /myapp/ruby/2.3/gems/bamboozled-0.1.0/lib/bamboozled/api/base.rb:38:in `request'
  from /myapp/ruby/2.3/gems/bamboozled-0.1.0/lib/bamboozled/api/employee.rb:38:in `block (2 levels) in <class:Employee>'
  from (irb):75
  from /myapp/ruby/2.3/gems/railties-4.2.10/lib/rails/commands/console.rb:110:in `start'
  from /myapp/ruby/2.3/gems/railties-4.2.10/lib/rails/commands/console.rb:9:in `start'
  from /myapp/ruby/2.3/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:68:in `console'
  from /myapp/ruby/2.3/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
  from /myapp/ruby/2.3/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
  from bin/rails:10:in `require'
  from bin/rails:10:in `<main>'
franzen commented 6 years ago

+1 on this one...

Applying this patch solved the problem for me: https://github.com/gorenje/bamboozled/commit/d478a86e723a138aaf7219891cc5900af5e10c68

ruprict commented 6 years ago

This was removed in this commit when we got rid of the ActiveSupport dependency.