`RDStation::Authentication.update_access_token()` no implicit conversion of String into Integer
luiztiago opened this issue ยท 5 comments
luiztiago commented
Hey guys,
I'm trying to fix our code with the recent library updates, but I'm getting this error below:
[1] pry(main)> @rdstation_authentication = RDStation::Authentication.new(ENV['RDSTATION_CLIENT_ID'], ENV['RDSTATION_SECRET'])
=> #<RDStation::Authentication:0x007fc3d92011e8 @client_id="xxxxxxx", @client_secret="xxxxxxxxxxx">
[2] pry(main)> token = @rdstation_authentication.update_access_token(ENV['RDSTATION_REFRESH'])
TypeError: no implicit conversion of String into Integer
from /Users/luiztiago/.rvm/gems/ruby-2.2.2/bundler/gems/rdstation-ruby-client-5ffad155720a/lib/rdstation/error_handler/conflicting_field.rb:22:in `[]'
Do you know if I'm doing something wrong?
luiztiago commented
Notes: These 3 ENV
variables are tested and everything ok.
matheussilvasantos commented
I got this error too. The API returns an array of errors, because of that, this line raise an error because it tries to access a key in an array. Not just that line, but other files that do the verification this way.
filipenasc commented
Hi @luiztiago! Sorry for the delay on response. @matheussilvasantos is right about the reason for this error. We are going to fix that in the next weeks.
Thanks for reporting this.
filipenasc commented
Could you guys take a look? #15
filipenasc commented
Solved: #15 โ๏ธ