lib/gzr/modules/user.rb in gazer-0.2.60 vs lib/gzr/modules/user.rb in gazer-0.3.0

- old
+ new

@@ -28,11 +28,11 @@ data = nil begin data = @sdk.me(fields ? {:fields=>fields} : nil ) rescue LookerSDK::Error => e say_error "Error querying me({:fields=>\"#{fields}\"})" - say_error e.message + say_error e raise end data end @@ -40,11 +40,11 @@ data = nil begin data = @sdk.user(id, fields ? {:fields=>fields} : nil ) rescue LookerSDK::Error => e say_error "Error querying user(#{id},{:fields=>\"#{fields}\"})" - say_error e.message + say_error e raise end data end @@ -62,11 +62,11 @@ begin req[:page] = page scratch_data = @sdk.search_users(req) rescue LookerSDK::ClientError => e say_error "Unable to get search_users(#{JSON.pretty_generate(req)})" - say_error e.message + say_error e raise end break if scratch_data.length == 0 page += 1 data += scratch_data @@ -87,11 +87,11 @@ begin req[:page] = page scratch_data = @sdk.all_users(req) rescue LookerSDK::ClientError => e say_error "Unable to get all_users(#{JSON.pretty_generate(req)})" - say_error e.message + say_error e raise end break if scratch_data.length == 0 page += 1 data += scratch_data @@ -103,23 +103,23 @@ data = nil begin data = @sdk.update_user(id,req) rescue LookerSDK::Error => e say_error "Error updating user(#{id},#{JSON.pretty_generate(req)})" - say_error e.message + say_error e raise end data end - + def delete_user(id) data = nil req = id begin data = @sdk.delete_user(req) rescue LookerSDK::Error => e say_error "Error deleting user(#{id},#{JSON.pretty_generate(req)})" - say_error e.message + say_error e raise end data end end