Exception: Katalyst::GoogleApis::Error

Inherits:
StandardError
  • Object
show all
Defined in:
app/services/katalyst/google_apis/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, status:, message:, details: nil) ⇒ Error

Returns a new instance of Error.



8
9
10
11
12
13
14
# File 'app/services/katalyst/google_apis/error.rb', line 8

def initialize(code:, status:, message:, details: nil)
  super(message)

  @code    = code
  @status  = status
  @details = details
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



6
7
8
# File 'app/services/katalyst/google_apis/error.rb', line 6

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'app/services/katalyst/google_apis/error.rb', line 6

def status
  @status
end

Instance Method Details

#inspectObject



16
17
18
19
20
21
22
# File 'app/services/katalyst/google_apis/error.rb', line 16

def inspect
  %W[#<#{self.class.name}
     code=#{code.inspect}
     status=#{status.inspect}
     message=#{message.inspect}
     details=#{details.inspect}>].join(" ")
end