Exception: FlowSpeech::APIError

Inherits:
Error
  • Object
show all
Defined in:
lib/flowspeech/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status:, code: nil, error_code: nil, retryable: false, retry_after: nil) ⇒ APIError

Returns a new instance of APIError.



14
15
16
17
18
19
20
21
# File 'lib/flowspeech/client.rb', line 14

def initialize(message, status:, code: nil, error_code: nil, retryable: false, retry_after: nil)
  super(message)
  @status = status
  @code = code
  @error_code = error_code
  @retryable = retryable
  @retry_after = retry_after
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



12
13
14
# File 'lib/flowspeech/client.rb', line 12

def code
  @code
end

#error_codeObject (readonly)

Returns the value of attribute error_code.



12
13
14
# File 'lib/flowspeech/client.rb', line 12

def error_code
  @error_code
end

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



12
13
14
# File 'lib/flowspeech/client.rb', line 12

def retry_after
  @retry_after
end

#retryableObject (readonly)

Returns the value of attribute retryable.



12
13
14
# File 'lib/flowspeech/client.rb', line 12

def retryable
  @retryable
end

#statusObject (readonly)

Returns the value of attribute status.



12
13
14
# File 'lib/flowspeech/client.rb', line 12

def status
  @status
end