Exception: ClientAuth::Errors::BaseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/client_auth/models/errors/base_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, detail) ⇒ BaseError

Returns a new instance of BaseError.



8
9
10
11
12
# File 'lib/client_auth/models/errors/base_error.rb', line 8

def initialize(status, detail)
  @status = status
  @title = self.class.name
  @detail = detail
end

Instance Attribute Details

#detailObject Also known as: message

Returns the value of attribute detail.



4
5
6
# File 'lib/client_auth/models/errors/base_error.rb', line 4

def detail
  @detail
end

#statusObject

Returns the value of attribute status.



4
5
6
# File 'lib/client_auth/models/errors/base_error.rb', line 4

def status
  @status
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'lib/client_auth/models/errors/base_error.rb', line 4

def title
  @title
end

Instance Method Details

#headersObject



18
19
20
# File 'lib/client_auth/models/errors/base_error.rb', line 18

def headers
  {}
end

#inspectObject



14
15
16
# File 'lib/client_auth/models/errors/base_error.rb', line 14

def inspect
  "#{status} #{title}: '#{detail}'"
end