Skip to content

Commit

Permalink
Add retry when fetching store version after creation
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Dec 11, 2023
1 parent 607e570 commit dc174b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/app_store/connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,12 @@ def create_app_store_version(version, build)

log "Creating app store version with ", {body: body}
api.tunes_request_client.post("appStoreVersions", body)
app.get_edit_app_store_version(includes: VERSION_DATA_INCLUDES)
execute_with_retry(AppStore::VersionNotFoundError) do
log("Fetching the created app store version")
inflight_version = app.get_edit_app_store_version(includes: VERSION_DATA_INCLUDES)
raise VersionNotFoundError unless inflight_version
inflight_version
end
end

# no of api calls: 1
Expand Down

0 comments on commit dc174b4

Please sign in to comment.