Method: Gruf::Error#fail!

Defined in:
lib/gruf/error.rb

#fail!(active_call) ⇒ GRPC::BadStatus

Fail the current gRPC call with the given error, properly attaching it to the call and raising the appropriate gRPC BadStatus code.

Parameters:

  • active_call (GRPC::ActiveCall)

    The marshalled gRPC call

Returns:

  • (GRPC::BadStatus)

    The gRPC BadStatus code this error is mapped to



144
145
146
# File 'lib/gruf/error.rb', line 144

def fail!(active_call)
  raise attach_to_call(active_call).grpc_error
end