Exception: Azure::TTS::RequestError
- Defined in:
- lib/azure/tts/errors.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#exception_message ⇒ Object
rubocop:disable Metrics/AbcSize.
-
#initialize(response) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(response) ⇒ RequestError
Returns a new instance of RequestError.
10 11 12 13 |
# File 'lib/azure/tts/errors.rb', line 10 def initialize(response) @response = response super() end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
8 9 10 |
# File 'lib/azure/tts/errors.rb', line 8 def response @response end |
Instance Method Details
#exception_message ⇒ Object
rubocop:disable Metrics/AbcSize
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/azure/tts/errors.rb', line 15 def # rubocop:disable Metrics/AbcSize format( "%<method>s request to %<url>s failed with status %<status>s (%<status_text>s). Response body: %<body>s", method: response.env.method.to_s.upcase, url: response.env.url.to_s, status: response.status, status_text: response.reason_phrase, body: response.body ) end |