Exception: CommandTower::Errors::Auth::SelfImpersonationError

Inherits:
ValidationError show all
Defined in:
app/errors/command_tower/errors/auth/self_impersonation_error.rb

Instance Attribute Summary

Attributes inherited from CommandTower::Errors::ApplicationError

#cause, #details

Instance Method Summary collapse

Methods inherited from CommandTower::Errors::ApplicationError

#log_level, #retryable?

Constructor Details

#initializeSelfImpersonationError

Returns a new instance of SelfImpersonationError.



7
8
9
# File 'app/errors/command_tower/errors/auth/self_impersonation_error.rb', line 7

def initialize
  super(details: { target: "cannot_impersonate_self" })
end

Instance Method Details

#codeObject



11
12
13
# File 'app/errors/command_tower/errors/auth/self_impersonation_error.rb', line 11

def code
  "self_impersonation_forbidden"
end

#messageObject



15
16
17
# File 'app/errors/command_tower/errors/auth/self_impersonation_error.rb', line 15

def message
  "Cannot impersonate yourself"
end