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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/script_v1/classes.rb,
generated/google/apis/script_v1/representations.rb,
generated/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 will contain this Status object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Status

Returns a new instance of Status



257
258
259
# File 'generated/google/apis/script_v1/classes.rb', line 257

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

Instance Attribute Details

#codeFixnum

The status code. For this API, this value will always be 3, corresponding to an INVALID_ARGUMENT error. Corresponds to the JSON property code

Returns:

  • (Fixnum)


242
243
244
# File 'generated/google/apis/script_v1/classes.rb', line 242

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>>)


248
249
250
# File 'generated/google/apis/script_v1/classes.rb', line 248

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 google.rpc.Status.details field, or localized by the client. Corresponds to the JSON property message

Returns:

  • (String)


255
256
257
# File 'generated/google/apis/script_v1/classes.rb', line 255

def message
  @message
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



262
263
264
265
266
# File 'generated/google/apis/script_v1/classes.rb', line 262

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