class ChatWork::AuthenticateError
Attributes
error[R]
error_description[R]
Public Class Methods
from_www_authenticate(www_authenticate:, status:, error_response:)
click to toggle source
# File lib/chatwork/chatwork_error.rb, line 71 def self.from_www_authenticate(www_authenticate:, status:, error_response:) www_authenticate =~ /error="([^\"]+)"/ error = Regexp.last_match(1) www_authenticate =~ /error_description="([^\"]+)"/ error_description = Regexp.last_match(1) AuthenticateError.new( www_authenticate, status, error_response, error, error_description, ) end
new(message, status, error_response, error, error_description)
click to toggle source
Calls superclass method
ChatWork::ChatWorkError::new
# File lib/chatwork/chatwork_error.rb, line 64 def initialize(message, status, error_response, error, error_description) @error = error @error_description = error_description super(message, status, error_response) end