Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Exposure Submission Flow - Error Alert adjustments #843

Merged
merged 9 commits into from
Jul 6, 2020

Conversation

melloskitten
Copy link
Member

Description

This PR aims to implement a better error handling of the infamous EN errors, as described in this issue here. Please note that this handles the errors thrown in the Exposure Submission flow primarily.

It will handle the ENError 5, 11, and 13. All of them now have an Alert Action "Mehr erfahren" that leads you to the FAQ.

I have also refactored the Error handling for the Exposure Submission flow, which had a lot of unecessary methods that did exactly the same thing. I also adjusted some namings because they seemed confusing to me (e.g. retry -> secondaryAction for alerts, and so on.)

@melloskitten melloskitten changed the title Feature/exposure submission error adjustment [Feature] Exposure Submission Flow - Error Alert adjustments Jul 3, 2020
@inf2381 inf2381 changed the title [Feature] Exposure Submission Flow - Error Alert adjustments Exposure Submission Flow - Error Alert adjustments Jul 3, 2020
@inf2381 inf2381 added the enhancement Improvement of an existing feature label Jul 3, 2020
@@ -53,18 +53,26 @@ class ExposureSubmissionWarnOthersViewController: DynamicTableViewController, EN
exposureSubmissionService = exposureSubmissionService ?? (navigationController as? ExposureSubmissionNavigationController)?.exposureSubmissionService
}

// MARK: - ExposureSubmissionService Helpers.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you remove this MARK?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks for the comment. Accident on my side 👍

@inf2381 inf2381 changed the base branch from develop to staging July 6, 2020 06:21
/// - secondaryActionCompletion: The completion handler for the secondary action.
/// - Returns: An alert with either one or two actions, with the specified completion handlers
/// and texts.
static func setupErrorAlert(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this additional file? Or can we consolidate it and use only extension of UIViewController + Alert.swift and maybe extend this one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I have refactored it into the already existing extension 👍

Copy link
Member

@johannesrohwer johannesrohwer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

message: String,
okTitle: String? = nil,
secondaryActionTitle: String? = nil,
hasSecondaryAction: Bool = false, completion: (() -> Void)? = nil,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing line break

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks for the notice.

@inf2381 inf2381 merged commit 23d4881 into staging Jul 6, 2020
@inf2381 inf2381 deleted the feature/exposure-submission-error-adjustment branch July 6, 2020 13:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants