Class: Camunda::Zeebe::Jobs

Inherits:
API
  • Object
show all
Defined in:
lib/camunda/zeebe/jobs.rb

Class Method Summary collapse

Methods inherited from API

authentication_headers, client, run

Class Method Details

.add_error(job_id:, error_code:, error_message: nil) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/camunda/zeebe/jobs.rb', line 6

def self.add_error(job_id:, error_code:, error_message: nil)
  params = {
    jobKey: job_id,
    errorCode: error_code
  }
  params[:errorMessage] = error_message if error_message.present?
  run(:throw_error, ::Zeebe::Client::GatewayProtocol::ThrowErrorRequest.new(params))
end