Exception: Common::Exceptions::RoutingError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/common/exceptions/routing_error.rb

Overview

Routing Error - if route is invalid

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseError

#log_to_sentry?, #message, #sentry_type, #status_code

Constructor Details

#initialize(path = nil) ⇒ RoutingError

Returns a new instance of RoutingError.



11
12
13
# File 'lib/common/exceptions/routing_error.rb', line 11

def initialize(path = nil)
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/common/exceptions/routing_error.rb', line 9

def path
  @path
end

Instance Method Details

#errorsObject



15
16
17
# File 'lib/common/exceptions/routing_error.rb', line 15

def errors
  Array(SerializableError.new(i18n_interpolated(detail: { path: @path })))
end