Exception: AkamaiApi::CCU::Error

Inherits:
Error
  • Object
show all
Defined in:
lib/akamai_api/ccu/error.rb

Overview

Error received after a request done through the Akamai CCU interface.

Direct Known Subclasses

PurgeStatus::NotFound

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw) ⇒ Error

Returns a new instance of Error.

Parameters:

  • raw (Hash<String, Object>)

    Raw object describing the error.



10
11
12
13
# File 'lib/akamai_api/ccu/error.rb', line 10

def initialize raw
  @raw = raw
  super raw['title'] || raw['detail']
end

Instance Attribute Details

#rawHash<String, Object> (readonly)

Returns raw Raw object describing the error.

Returns:

  • (Hash<String, Object>)

    raw Raw object describing the error.



7
8
9
# File 'lib/akamai_api/ccu/error.rb', line 7

def raw
  @raw
end

Instance Method Details

#codeFixnum Also known as: http_status

Returns Response HTTP Status Code describing the error.

Returns:

  • (Fixnum)

    Response HTTP Status Code describing the error



28
29
30
# File 'lib/akamai_api/ccu/error.rb', line 28

def code
  raw['httpStatus']
end

#described_byString

Returns URI pointing to a verbose error description.

Returns:

  • (String)

    URI pointing to a verbose error description



34
35
36
# File 'lib/akamai_api/ccu/error.rb', line 34

def described_by
  raw['describedBy']
end

#detailString

Returns Specific detail about the error.

Returns:

  • (String)

    Specific detail about the error



21
22
23
# File 'lib/akamai_api/ccu/error.rb', line 21

def detail
  raw['detail']
end

#support_idString

Returns Reference provided to Customer Care when needed.

Returns:

  • (String)

    Reference provided to Customer Care when needed.



16
17
18
# File 'lib/akamai_api/ccu/error.rb', line 16

def support_id
  raw['supportId']
end