Exception: AppStoreConnectApi::ApiError

Inherits:
Error
  • Object
show all
Defined in:
lib/app_store_connect_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ ApiError

Returns a new instance of ApiError.



15
16
17
18
# File 'lib/app_store_connect_api.rb', line 15

def initialize(errors)
  @errors = errors
  super 'App Store Connect API request failed'
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



13
14
15
# File 'lib/app_store_connect_api.rb', line 13

def errors
  @errors
end

Instance Method Details

#codeObject



20
21
22
# File 'lib/app_store_connect_api.rb', line 20

def code
  errors.first[:code]
end

#statusObject



24
25
26
# File 'lib/app_store_connect_api.rb', line 24

def status
  errors.first[:status].to_i
end