Exception: CFoundry::Denied

Inherits:
APIError
  • Object
show all
Defined in:
lib/cfoundry/errors.rb

Overview

Exception raised when access is denied to something, either because the user is not logged in or is not an administrator.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from APIError

#to_s

Constructor Details

#initialize(error_code = 200, description = "Operation not permitted") ⇒ Denied

Initialize, with a default error code and message.



84
85
86
87
88
89
# File 'lib/cfoundry/errors.rb', line 84

def initialize(
    error_code = 200,
    description = "Operation not permitted")
  @error_code = error_code
  @description = description
end

Instance Attribute Details

#descriptionObject (readonly)

Specific description.



81
82
83
# File 'lib/cfoundry/errors.rb', line 81

def description
  @description
end

#error_codeObject (readonly)

Specific error code.



78
79
80
# File 'lib/cfoundry/errors.rb', line 78

def error_code
  @error_code
end