Exception: Doorkeeper::Errors::MissingResourceColumn

Inherits:
DoorkeeperError
  • Object
show all
Defined in:
lib/doorkeeper/errors.rb

Overview

Raised when resource_indicator_validator is configured but the required resource column has not been added to the database. Provides an actionable message pointing to the generator.

#type returns :server_error so the token endpoint (which rescues DoorkeeperError and builds an OAuth error response from #type) emits a spec-compliant error code; the actionable message is retained on the exception for logs rather than being sent as the error value.

Instance Method Summary collapse

Methods inherited from DoorkeeperError

translate_options

Constructor Details

#initialize(table) ⇒ MissingResourceColumn

Returns a new instance of MissingResourceColumn.



106
107
108
109
110
111
# File 'lib/doorkeeper/errors.rb', line 106

def initialize(table)
  super(
    "resource_indicator_validator is configured but the `resource` column is missing from " \
    "the #{table} table. Run `rails generate doorkeeper:resource_indicators` and apply the migration.",
  )
end

Instance Method Details

#typeObject



113
114
115
# File 'lib/doorkeeper/errors.rb', line 113

def type
  :server_error
end