Exception: RunApi::Core::TaskFailedError

Inherits:
Error
  • Object
show all
Defined in:
lib/runapi/core/errors.rb

Overview

Raised when async task fails during processing.

Constant Summary

Constants inherited from Error

Error::DEFAULT_MESSAGES, Error::STATUS_MAP

Instance Attribute Summary

Attributes inherited from Error

#code, #details, #request_id, #response_headers, #status

Instance Method Summary collapse

Methods inherited from Error

from_response, #response_header, #runapi_task_id, #to_h

Constructor Details

#initialize(message = "Task failed", **kwargs) ⇒ TaskFailedError

Returns a new instance of TaskFailedError.



264
265
266
267
# File 'lib/runapi/core/errors.rb', line 264

def initialize(message = "Task failed", **kwargs)
  kwargs[:code] = "task_failed" unless kwargs.key?(:code)
  super
end