Exception: Spaceship::UnexpectedResponse

Inherits:
StandardError show all
Defined in:
spaceship/lib/spaceship/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from StandardError

#exit_status

Methods inherited from Exception

#fastlane_should_report_metrics?

Constructor Details

#initialize(error_info = nil) ⇒ UnexpectedResponse

Returns a new instance of UnexpectedResponse.



49
50
51
52
# File 'spaceship/lib/spaceship/errors.rb', line 49

def initialize(error_info = nil)
  super(error_info)
  @error_info = error_info
end

Instance Attribute Details

#error_infoObject (readonly)

Returns the value of attribute error_info.



47
48
49
# File 'spaceship/lib/spaceship/errors.rb', line 47

def error_info
  @error_info
end

Instance Method Details

#preferred_error_infoObject



54
55
56
57
58
59
60
61
62
# File 'spaceship/lib/spaceship/errors.rb', line 54

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