Class: Temporal::Client::Serializer::Failure

Inherits:
Base
  • Object
show all
Includes:
Temporal::Concerns::Payloads
Defined in:
lib/temporal/client/serializer/failure.rb

Instance Method Summary collapse

Methods included from Temporal::Concerns::Payloads

#from_details_payloads, #from_payload, #from_payloads, #from_result_payloads, #from_signal_payloads, #to_details_payloads, #to_payload, #to_payloads, #to_result_payloads, #to_signal_payloads

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Temporal::Client::Serializer::Base

Instance Method Details

#to_protoObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/temporal/client/serializer/failure.rb', line 10

def to_proto
  Temporal::Api::Failure::V1::Failure.new(
    message: object.message,
    stack_trace: stack_trace_from(object.backtrace),
    application_failure_info: Temporal::Api::Failure::V1::ApplicationFailureInfo.new(
      type: object.class.name,
      details: to_details_payloads(object.message)
    )
  )
end