813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
|
# File 'spaceship/lib/spaceship/client.rb', line 813
def detect_most_common_errors_and_raise_exceptions(body)
if body["messages"] && body["messages"]["error"].include?("Forbidden")
raise_insufficient_permission_error!
elsif body["messages"] && body["messages"]["error"].include?("insufficient privileges")
raise_insufficient_permission_error!(caller_location: 3)
elsif body.to_s.include?("Internal Server Error - Read")
raise InternalServerError, "Received an internal server error from App Store Connect / Developer Portal, please try again later"
elsif body.to_s.include?("Gateway Timeout - In read")
raise GatewayTimeoutError, "Received a gateway timeout error from App Store Connect / Developer Portal, please try again later"
elsif (body["userString"] || "").include?("Program License Agreement")
raise ProgramLicenseAgreementUpdated, "#{body['userString']} Please manually log into your Apple Developer account to review and accept the updated agreement."
end
end
|