Exception: CodexNotify::SlackClient::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/codex_notify/slack_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response: nil, error_code: nil, http_status: nil, retry_after: nil, retryable: false, ambiguous: false, stale_thread: false) ⇒ Error

Returns a new instance of Error.



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/codex_notify/slack_client.rb', line 13

def initialize(message, response: nil, error_code: nil, http_status: nil, retry_after: nil,
               retryable: false, ambiguous: false, stale_thread: false)
  super(message)
  @response = response
  @error_code = error_code
  @http_status = http_status
  @retry_after = retry_after
  @retryable = retryable
  @ambiguous = ambiguous
  @stale_thread = stale_thread
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



11
12
13
# File 'lib/codex_notify/slack_client.rb', line 11

def error_code
  @error_code
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



11
12
13
# File 'lib/codex_notify/slack_client.rb', line 11

def http_status
  @http_status
end

#responseObject (readonly)

Returns the value of attribute response.



11
12
13
# File 'lib/codex_notify/slack_client.rb', line 11

def response
  @response
end

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



11
12
13
# File 'lib/codex_notify/slack_client.rb', line 11

def retry_after
  @retry_after
end

Instance Method Details

#ambiguous?Boolean

Returns:

  • (Boolean)


26
# File 'lib/codex_notify/slack_client.rb', line 26

def ambiguous? = @ambiguous

#retryable?Boolean

Returns:

  • (Boolean)


25
# File 'lib/codex_notify/slack_client.rb', line 25

def retryable? = @retryable

#stale_thread?Boolean

Returns:

  • (Boolean)


27
# File 'lib/codex_notify/slack_client.rb', line 27

def stale_thread? = @stale_thread