Class: Verikloak::Audience::Error

Inherits:
Error
  • Object
show all
Defined in:
lib/verikloak/audience/errors.rb

Overview

Base error for audience failures. Inherits from Error so that rescue Verikloak::Error catches all Verikloak gem errors uniformly.

Inherits code and http_status accessors from Error. The parent class defines attr_reader :code, :http_status and accepts code: / http_status: keyword arguments in its initializer.

Direct Known Subclasses

ConfigurationError, Forbidden

Instance Method Summary collapse

Constructor Details

#initialize(msg = 'audience error', code: 'audience_error', http_status: 403) ⇒ Error

Returns a new instance of Error.

Parameters:

  • msg (String) (defaults to: 'audience error')

    human-readable error message

  • code (String) (defaults to: 'audience_error')

    machine-friendly error code

  • http_status (Integer) (defaults to: 403)

    associated HTTP status



18
19
20
# File 'lib/verikloak/audience/errors.rb', line 18

def initialize(msg = 'audience error', code: 'audience_error', http_status: 403)
  super
end