Exception: Gruf::Client::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/gruf/client/error.rb

Overview

Represents an error that was returned from the server’s trailing metadata. Used as a custom exception object that is instead raised in the case of the service returning serialized error data, as opposed to the normal GRPC::BadStatus error

Direct Known Subclasses

Gruf::Client::Errors::Base

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ Error

Initialize the client error

Parameters:

  • error (Object)

    The deserialized error



34
35
36
# File 'lib/gruf/client/error.rb', line 34

def initialize(error)
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns error The deserialized error.

Returns:

  • (Object)

    error The deserialized error



27
28
29
# File 'lib/gruf/client/error.rb', line 27

def error
  @error
end