Exception: OAuth2::AuthError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/oauth20/auth_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, description = nil) ⇒ AuthError

Returns a new instance of AuthError.



18
19
20
21
# File 'lib/oauth20/auth_error.rb', line 18

def initialize(message, description = nil)
  super(message)
  @description = description
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



16
17
18
# File 'lib/oauth20/auth_error.rb', line 16

def description
  @description
end

Instance Method Details

#to_error_infoObject



23
24
25
26
# File 'lib/oauth20/auth_error.rb', line 23

def to_error_info
  desc = "&error_description=#{self.description}" unless description.nil?
  "error=#{message}#{desc}"
end