ubersmith 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ubersmith/client.rb +5 -1
- metadata +2 -2
data/lib/ubersmith/client.rb
CHANGED
@@ -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
|
-
|
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
|
|