Skip to content

Commit

Permalink
Handle attachments upload in progress error
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Dec 13, 2023
1 parent 87d176c commit 07b05d3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/app_store/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,18 @@ def as_json
end
end

class AttachmentUploadInProgress < StandardError
MSG = "The app store version is not in a valid state to submit for review, attachment uploads still in progress"

def initialize(msg = MSG)
super
end

def as_json
AppStore.error_as_json(:release, :attachment_upload_in_progress)
end
end

class SubmissionWithItemsExistError < StandardError
MSG = "Cannot submit for review - a review submission already exists with items"

Expand Down
4 changes: 4 additions & 0 deletions spaceship/wrapper_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class WrapperError
{
message_matcher: /Version is not ready to be submitted yet/i,
decorated_exception: AppStore::InvalidReviewStateError
},
{
message_matcher: /Attachment uploads still in progress/i,
decorated_exception: AppStore::AttachmentUploadInProgress
}
]

Expand Down

0 comments on commit 07b05d3

Please sign in to comment.