Exception: GetStreamRuby::TaskError

Inherits:
StreamError
  • Object
show all
Defined in:
lib/getstream_ruby/errors.rb

Overview

Raised by ‘Client#wait_for_task` when an async task finishes with status=“failed”. Carries the populated `ErrorResult` fields.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task_id:, error_type:, description:, stack_trace: nil, version: nil) ⇒ TaskError

Returns a new instance of TaskError.



80
81
82
83
84
85
86
87
88
# File 'lib/getstream_ruby/errors.rb', line 80

def initialize(task_id:, error_type:, description:,
               stack_trace: nil, version: nil)
  super(description)
  @task_id = task_id
  @error_type = error_type
  @description = description
  @stack_trace = stack_trace
  @version = version
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



78
79
80
# File 'lib/getstream_ruby/errors.rb', line 78

def description
  @description
end

#error_typeObject (readonly)

Returns the value of attribute error_type.



78
79
80
# File 'lib/getstream_ruby/errors.rb', line 78

def error_type
  @error_type
end

#stack_traceObject (readonly)

Returns the value of attribute stack_trace.



78
79
80
# File 'lib/getstream_ruby/errors.rb', line 78

def stack_trace
  @stack_trace
end

#task_idObject (readonly)

Returns the value of attribute task_id.



78
79
80
# File 'lib/getstream_ruby/errors.rb', line 78

def task_id
  @task_id
end

#versionObject (readonly)

Returns the value of attribute version.



78
79
80
# File 'lib/getstream_ruby/errors.rb', line 78

def version
  @version
end