Exception: Spaceship::Client::UnexpectedResponse
- Inherits:
-
StandardError
- Object
- StandardError
- Spaceship::Client::UnexpectedResponse
- Defined in:
- lib/spaceship/client.rb
Instance Attribute Summary collapse
-
#error_info ⇒ Object
readonly
Returns the value of attribute error_info.
Instance Method Summary collapse
-
#initialize(error_info = nil) ⇒ UnexpectedResponse
constructor
A new instance of UnexpectedResponse.
- #preferred_error_info ⇒ Object
Constructor Details
#initialize(error_info = nil) ⇒ UnexpectedResponse
Returns a new instance of UnexpectedResponse.
56 57 58 59 |
# File 'lib/spaceship/client.rb', line 56 def initialize(error_info = nil) super(error_info) @error_info = error_info end |
Instance Attribute Details
#error_info ⇒ Object (readonly)
Returns the value of attribute error_info.
54 55 56 |
# File 'lib/spaceship/client.rb', line 54 def error_info @error_info end |
Instance Method Details
#preferred_error_info ⇒ Object
61 62 63 64 65 66 67 68 69 |
# File 'lib/spaceship/client.rb', line 61 def preferred_error_info return nil unless @error_info.kind_of?(Hash) && @error_info['resultString'] [ "Apple provided the following error info:", @error_info['resultString'], @error_info['userString'] ].compact.uniq # sometimes 'resultString' and 'userString' are the same value end |