Class: GetStream::Generated::Models::APIError

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/api_error.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ APIError

Initialize with attributes



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 38

def initialize(attributes = {})
  super(attributes)
  @StatusCode = attributes[:StatusCode] || attributes['StatusCode']
  @code = attributes[:code] || attributes['code']
  @duration = attributes[:duration] || attributes['duration']
  @message = attributes[:message] || attributes['message']
  @more_info = attributes[:more_info] || attributes['more_info']
  @details = attributes[:details] || attributes['details']
  @unrecoverable = attributes[:unrecoverable] || attributes['unrecoverable'] || nil
  @exception_fields = attributes[:exception_fields] || attributes['exception_fields'] || nil
end

Instance Attribute Details

#codeInteger

Returns API error code.

Returns:

  • (Integer)

    API error code



17
18
19
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 17

def code
  @code
end

#detailsArray<Integer>

Returns Additional error-specific information.

Returns:

  • (Array<Integer>)

    Additional error-specific information



29
30
31
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 29

def details
  @details
end

#durationString

Returns Request duration.

Returns:

  • (String)

    Request duration



20
21
22
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 20

def duration
  @duration
end

#exception_fieldsHash<String, String>

Returns Additional error info.

Returns:

  • (Hash<String, String>)

    Additional error info



35
36
37
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 35

def exception_fields
  @exception_fields
end

#messageString

Returns Message describing an error.

Returns:

  • (String)

    Message describing an error



23
24
25
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 23

def message
  @message
end

#more_infoString

Returns URL with additional information.

Returns:

  • (String)

    URL with additional information



26
27
28
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 26

def more_info
  @more_info
end

#StatusCodeInteger

Returns Response HTTP status code.

Returns:

  • (Integer)

    Response HTTP status code



14
15
16
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 14

def StatusCode
  @StatusCode
end

#unrecoverableBoolean

Returns Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it.

Returns:

  • (Boolean)

    Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it



32
33
34
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 32

def unrecoverable
  @unrecoverable
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 51

def self.json_field_mappings
  {
    StatusCode: 'StatusCode',
    code: 'code',
    duration: 'duration',
    message: 'message',
    more_info: 'more_info',
    details: 'details',
    unrecoverable: 'unrecoverable',
    exception_fields: 'exception_fields'
  }
end