Exception: ControlplaneApiDirect::ForbiddenError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/core/controlplane_api_direct.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url:, response:) ⇒ ForbiddenError

Returns a new instance of ForbiddenError.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/core/controlplane_api_direct.rb', line 29

def initialize(url:, response:)
  @url = url
  org = ControlplaneApiDirect.parse_org(url)
  message =
    if org
      "Double check your org #{org}. #{response}"
    else
      "Control Plane API request to #{url} was forbidden. #{response}"
    end

  super(message)
end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



27
28
29
# File 'lib/core/controlplane_api_direct.rb', line 27

def url
  @url
end