When calling
def self.get_system_data()
using a non-existing system_key, the resulting message is empty apparently.
JSON parse then crashes:
/usr/share/ruby/gems/2.0/gems/json-1.8.2/lib/json/common.rb:155:in initialize': A JSON text must at least contain two octets! (JSON::ParserError) from /usr/share/ruby/gems/2.0/gems/json-1.8.2/lib/json/common.rb:155:innew'
from /usr/share/ruby/gems/2.0/gems/json-1.8.2/lib/json/common.rb:155:in parse' from /usr/local/share/ruby/gems/2.0/gems/jumpcloud-0.4.0/lib/jumpcloud.rb:88:inget_system_data'
from /usr/local/share/ruby/gems/2.0/gems/jumpcloud-0.4.0/lib/jumpcloud.rb:48:in set_system_name' from ./jumpcloud-settags:3:in'
You should return an error saying that the system_key doesn't exists instead.
Hi,
When calling def self.get_system_data() using a non-existing system_key, the resulting message is empty apparently.
JSON parse then crashes:
/usr/share/ruby/gems/2.0/gems/json-1.8.2/lib/json/common.rb:155:in'
initialize': A JSON text must at least contain two octets! (JSON::ParserError) from /usr/share/ruby/gems/2.0/gems/json-1.8.2/lib/json/common.rb:155:in
new' from /usr/share/ruby/gems/2.0/gems/json-1.8.2/lib/json/common.rb:155:inparse' from /usr/local/share/ruby/gems/2.0/gems/jumpcloud-0.4.0/lib/jumpcloud.rb:88:in
get_system_data' from /usr/local/share/ruby/gems/2.0/gems/jumpcloud-0.4.0/lib/jumpcloud.rb:48:inset_system_name' from ./jumpcloud-settags:3:in
You should return an error saying that the system_key doesn't exists instead.
Thanks nicolas