Exception: Assembly::ServerError
- Inherits:
-
StandardError
- Object
- StandardError
- Assembly::ServerError
show all
- Defined in:
- lib/assembly/client.rb
Instance Method Summary
collapse
Constructor Details
#initialize(response) ⇒ ServerError
Returns a new instance of ServerError.
179
180
181
|
# File 'lib/assembly/client.rb', line 179
def initialize(response)
@response = response
end
|
Instance Method Details
#message ⇒ Object
187
188
189
190
191
192
193
194
|
# File 'lib/assembly/client.rb', line 187
def message
body = @response.body
if body && body.length > 0
body[:message]
else
"No Error Message - Server response body was empty."
end
end
|
#status ⇒ Object
183
184
185
|
# File 'lib/assembly/client.rb', line 183
def status
@response.status
end
|
#to_s ⇒ Object
196
197
198
|
# File 'lib/assembly/client.rb', line 196
def to_s
"[#{status}] #{message}"
end
|