ubersmith 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/ubersmith/client.rb +5 -1
  2. metadata +2 -2
@@ -39,7 +39,11 @@ module Ubersmith
39
39
  :method => components[0] + '.' + components[1],
40
40
  }.merge(options)), :cache => cache)
41
41
  ret = JSON.parse(ret)
42
- raise ret['error_message'] if ret['status'] == false
42
+ if !ret.respond_to?(:[]) || ret['status'] != true
43
+ raise ret['error_message'] if ret['error_message'].to_s =~ /invalid method specified/
44
+ puts "Ubersmith error: #{ret['error_message']}"
45
+ return {}
46
+ end
43
47
  ret['data']
44
48
  end
45
49
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 2
9
- version: 1.0.2
8
+ - 3
9
+ version: 1.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - David Wegman