Exception: Operations::Errors::NotAuthorizedError

Inherits:
BaseException
  • Object
show all
Defined in:
lib/operations/errors/not_authorized_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(operation = nil, msg = nil) ⇒ NotAuthorizedError

Returns a new instance of NotAuthorizedError.



4
5
6
7
8
# File 'lib/operations/errors/not_authorized_error.rb', line 4

def initialize(operation=nil, msg=nil)
  cause = msg || "unknown"
  operation_name = operation ? operation.name : 'insufficient privileges'
  super("Operation access denied: #{operation_name}. Cause: #{cause}")
end