Class: Google::Cloud::Bigtable::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/bigtable/status.rb

Overview

Status

Represents a logical error model from the Bigtable service, containing an error code, an error message, and optional error details.

Examples:

require "google/cloud/bigtable"

bigtable = Google::Cloud::Bigtable.new

table = bigtable.table("my-instance", "my-table")

entries = []
entries << table.new_mutation_entry("row-1").set_cell("cf1", "field1", "XYZ")
entries << table.new_mutation_entry("row-2").set_cell("cf1", "field1", "ABC")
responses = table.mutate_rows(entries)

responses.each do |response|
  puts response.status.description
end

Instance Attribute Summary collapse

Instance Attribute Details

#codeInteger

The status code, which should be an enum value of google.rpc.Code.

Returns:

  • (Integer)

    the current value of code



49
50
51
# File 'lib/google/cloud/bigtable/status.rb', line 49

def code
  @code
end

#descriptionString

The human-readable description for the status code, which should be an enum value of google.rpc.Code. For example, INVALID_ARGUMENT.

Returns:

  • (String)

    the current value of description



49
50
51
# File 'lib/google/cloud/bigtable/status.rb', line 49

def description
  @description
end

#detailsArray<String>

A list of messages that carry the error details.

Returns:

  • (Array<String>)

    the current value of details



49
50
51
# File 'lib/google/cloud/bigtable/status.rb', line 49

def details
  @details
end

#messageString

A developer-facing error message, which should be in English.

Returns:

  • (String)

    the current value of message



49
50
51
# File 'lib/google/cloud/bigtable/status.rb', line 49

def message
  @message
end