Class: Retab::ErrorDetails

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_runs/error_details.rb

Constant Summary collapse

HASH_ATTRS =
{
  message: :message,
  stack_trace: :stack_trace,
  block_id: :block_id,
  block_name: :block_name,
  error_code: :error_code,
  context: :context
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ ErrorDetails

Returns a new instance of ErrorDetails.



25
26
27
28
29
30
31
32
33
# File 'lib/retab/workflow_runs/error_details.rb', line 25

def initialize(json)
  hash = self.class.normalize(json)
  @message = hash[:message]
  @stack_trace = hash[:stack_trace]
  @block_id = hash[:block_id]
  @block_name = hash[:block_name]
  @error_code = hash[:error_code]
  @context = hash[:context] || {}
end

Instance Attribute Details

#block_idObject

Returns the value of attribute block_id.



17
18
19
# File 'lib/retab/workflow_runs/error_details.rb', line 17

def block_id
  @block_id
end

#block_nameObject

Returns the value of attribute block_name.



17
18
19
# File 'lib/retab/workflow_runs/error_details.rb', line 17

def block_name
  @block_name
end

#contextObject

Returns the value of attribute context.



17
18
19
# File 'lib/retab/workflow_runs/error_details.rb', line 17

def context
  @context
end

#error_codeObject

Returns the value of attribute error_code.



17
18
19
# File 'lib/retab/workflow_runs/error_details.rb', line 17

def error_code
  @error_code
end

#messageObject

Returns the value of attribute message.



17
18
19
# File 'lib/retab/workflow_runs/error_details.rb', line 17

def message
  @message
end

#stack_traceObject

Returns the value of attribute stack_trace.



17
18
19
# File 'lib/retab/workflow_runs/error_details.rb', line 17

def stack_trace
  @stack_trace
end