Class: Struct::BatchResult

Inherits:
Object show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb

Overview

BatchResult is the struct returned by calls to call#start_batch.

Instance Method Summary collapse

Instance Method Details

#check_statusObject

check_status returns the status, raising an error if the status is non-nil and not OK.



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb', line 24

def check_status
  return nil if status.nil?
  if status.code != GRPC::Core::StatusCodes::OK
    GRPC.logger.debug("Failing with status #{status}")
    # raise BadStatus, propagating the metadata if present.
    fail GRPC::BadStatus.new_status_exception(
      status.code, status.details, status.,
      status.debug_error_string)
  end
  status
end