Class: GetStream::Generated::Models::APIError
- Defined in:
- lib/getstream_ruby/generated/models/api_error.rb
Instance Attribute Summary collapse
-
#code ⇒ Integer
API error code.
-
#details ⇒ Array<Integer>
Additional error-specific information.
-
#duration ⇒ String
Request duration.
-
#exception_fields ⇒ Hash<String, String>
Additional error info.
-
#message ⇒ String
Message describing an error.
-
#more_info ⇒ String
URL with additional information.
-
#StatusCode ⇒ Integer
Response HTTP status code.
-
#unrecoverable ⇒ 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.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ APIError
constructor
Initialize with attributes.
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'] = 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
#code ⇒ Integer
17 18 19 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 17 def code @code end |
#details ⇒ Array<Integer>
29 30 31 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 29 def details @details end |
#duration ⇒ String
20 21 22 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 20 def duration @duration end |
#exception_fields ⇒ Hash<String, String>
35 36 37 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 35 def exception_fields @exception_fields end |
#message ⇒ String
23 24 25 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 23 def end |
#more_info ⇒ String
26 27 28 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 26 def more_info @more_info end |
#StatusCode ⇒ Integer
14 15 16 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 14 def StatusCode @StatusCode end |
#unrecoverable ⇒ Boolean
32 33 34 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 32 def unrecoverable @unrecoverable end |
Class Method Details
.json_field_mappings ⇒ Object
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 |