Exception: CommandTower::Errors::ContinuationExhaustedError

Inherits:
ApplicationError
  • Object
show all
Defined in:
app/errors/command_tower/errors/continuation_exhausted_error.rb

Instance Attribute Summary

Attributes inherited from ApplicationError

#cause, #details

Instance Method Summary collapse

Methods inherited from ApplicationError

#initialize, #retryable?

Constructor Details

This class inherits a constructor from CommandTower::Errors::ApplicationError

Instance Method Details

#codeObject



6
7
8
# File 'app/errors/command_tower/errors/continuation_exhausted_error.rb', line 6

def code
  "continuation_exhausted"
end

#log_levelObject



20
21
22
# File 'app/errors/command_tower/errors/continuation_exhausted_error.rb', line 20

def log_level
  :error
end

#messageObject



10
11
12
13
14
15
16
17
18
# File 'app/errors/command_tower/errors/continuation_exhausted_error.rb', line 10

def message
  attempt = details.is_a?(Hash) ? details[:attempt] : nil
  max_attempts = details.is_a?(Hash) ? details[:max_attempts] : nil
  if attempt && max_attempts
    "delayed continuation exhausted after attempt #{attempt} of #{max_attempts}"
  else
    "delayed continuation exhausted"
  end
end