Module: OauthDoorman::Error
- Included in:
- AccessAPI, DomainGroupsAPI, UserInfoAPI
- Defined in:
- lib/oauth_doorman/oauth_error.rb
Instance Method Summary collapse
Instance Method Details
#process_error(request_result) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/oauth_doorman/oauth_error.rb', line 7 def process_error(request_result) if request_result == nil raise OauthError, "nil response content" end json = JSON.parse(request_result) rescue nil if json && json.has_key?("error") raise OauthError, json end end |