Skip to content

Commit

Permalink
Bettered error
Browse files Browse the repository at this point in the history
  • Loading branch information
Epigene committed Sep 24, 2015
1 parent c29944d commit 84090d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/sacps/auth/draugiem_id/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def authorize!
params = {params: {action: "authorize", app: SacPS::Auth::DraugiemId.app_key, code: @dr_auth_code} }
response = RestClient.get(uri, params)
response = JSON.parse(response)
raise %Q|SacPS::Auth::DraugiemId\n#{response["error"]}| if response["error"].present?
raise %Q|SacPS::Auth::DraugiemId::Notification\n#{response["error"]}| if response["error"].present?
@auth_response = response
@user_apikey = @auth_response["apikey"]
return response
Expand All @@ -35,7 +35,7 @@ def request_user_data!
params = {params: {action: "userdata", app: SacPS::Auth::DraugiemId.app_key, apikey: @user_apikey} }
response = RestClient.get(uri, params)
response = JSON.parse(response)
raise %Q|SacPS::Auth::DraugiemId\n#{response["error"]}| if response["error"].present?
raise %Q|SacPS::Auth::DraugiemId::Notification\n#{response["error"]}| if response["error"].present?
@user_data_response = response
return response
end
Expand Down
2 changes: 1 addition & 1 deletion lib/sacps/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module SacPS
VERSION = "0.0.7"
VERSION = "0.0.8"
end

0 comments on commit 84090d8

Please sign in to comment.