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)
raise Restate::TerminalError.new('bad input', metadata: { 'field' => 'name' })

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of TerminalError.



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

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

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata.



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

def 
  @metadata
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



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

def status_code
  @status_code
end