def to_rpc_status
      status = to_status

      return if status.nil?

      GoogleRpcStatusUtils.extract_google_rpc_status(status)
    rescue Google::Protobuf::ParseError => parse_error
      GRPC.logger.warn('parse error: to_rpc_status failed')
      GRPC.logger.warn(parse_error)
      nil
    end
def to_rpc_status
      status = to_status

      return if status.nil?

      GoogleRpcStatusUtils.extract_google_rpc_status(status)
    rescue Google::Protobuf::ParseError => parse_error
      GRPC.logger.warn('parse error: to_rpc_status failed')
      GRPC.logger.warn(parse_error)
      nil
    end
Converts the exception to a deserialized {Google::Rpc::Status} object.
 Returns `nil` if the `grpc-status-details-bin` trailer could not be
 converted to a {Google::Rpc::Status} due to the server not providing
 the necessary trailers.

 @return [Google::Rpc::Status, nil]