Exception: KB::ClientError

Inherits:
Error
  • Object
show all
Defined in:
lib/kb/errors/client_error.rb

Direct Known Subclasses

ConflictError, UnprocessableEntityError

Instance Attribute Summary

Attributes inherited from Error

#body, #status_code

Instance Method Summary collapse

Methods inherited from Error

from_faraday, #initialize

Constructor Details

This class inherits a constructor from KB::Error

Instance Method Details

#messageObject



3
4
5
6
7
# File 'lib/kb/errors/client_error.rb', line 3

def message
  JSON.parse(body)['message']
rescue StandardError
  body
end