Exception: Restate::TerminalError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/restate/errors.rb

Overview

Raised to indicate a non-retryable failure. Restate will not retry the invocation.

Examples:

raise Restate::TerminalError.new('not found', status_code: 404)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = 'Internal Server Error', status_code: 500) ⇒ TerminalError

Returns a new instance of TerminalError.



12
13
14
15
# File 'lib/restate/errors.rb', line 12

def initialize(message = 'Internal Server Error', status_code: 500)
  super(message)
  @status_code = status_code
end

Instance Attribute Details

#status_codeObject (readonly)

Returns the value of attribute status_code.



10
11
12
# File 'lib/restate/errors.rb', line 10

def status_code
  @status_code
end