codemagic-ci-cd / cli-tools

Various utilities to managing Android and iOS app builds, code signing, and deployment.
https://codemagic.io/start/
GNU General Public License v3.0
261 stars 42 forks source link

Bugfix: Do not require `detail` field from App Store Connect API error #316

Closed priitlatt closed 1 year ago

priitlatt commented 1 year ago

App Store Connect API can respond with error response that has payload like

{
  "errors": [
    {
      "status": "409",
      "source": {
        "pointer": "/data/relationships/appStoreVersion"
      },
      "code": "ENTITY_ERROR.RELATIONSHIP.INVALID.NOT_ALLOWED",
      "id": "272d2697-763d-4994-99cc-e1a77f31843f",
      "title": "Only one appStoreVersion can be present in reviewSubmissions."
    }
  ]
}

Currently it is expected that each error contains a field detail, which might be missing. Make it optional to cope with such response payloads.