Class: Google::Apis::ScriptV1::Status

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/script_v1/classes.rb,
lib/google/apis/script_v1/representations.rb,
lib/google/apis/script_v1/representations.rb

Overview

If a run call succeeds but the script function (or Apps Script itself) throws an exception, the response body's error field contains this Status object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Status

Returns a new instance of Status.



991
992
993
# File 'lib/google/apis/script_v1/classes.rb', line 991

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#codeFixnum

The status code. For this API, this value either: - 10, indicating a SCRIPT_TIMEOUT error, - 3, indicating an INVALID_ARGUMENT error, or - 1, indicating a CANCELLED execution. Corresponds to the JSON property code

Returns:

  • (Fixnum)


977
978
979
# File 'lib/google/apis/script_v1/classes.rb', line 977

def code
  @code
end

#detailsArray<Hash<String,Object>>

An array that contains a single ExecutionError object that provides information about the nature of the error. Corresponds to the JSON property details

Returns:

  • (Array<Hash<String,Object>>)


983
984
985
# File 'lib/google/apis/script_v1/classes.rb', line 983

def details
  @details
end

#messageString

A developer-facing error message, which is in English. Any user-facing error message is localized and sent in the details field, or localized by the client. Corresponds to the JSON property message

Returns:

  • (String)


989
990
991
# File 'lib/google/apis/script_v1/classes.rb', line 989

def message
  @message
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



996
997
998
999
1000
# File 'lib/google/apis/script_v1/classes.rb', line 996

def update!(**args)
  @code = args[:code] if args.key?(:code)
  @details = args[:details] if args.key?(:details)
  @message = args[:message] if args.key?(:message)
end