Skip to content

Commit

Permalink
♻️ Show experience errors for preview failures
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaatttt committed Aug 21, 2023
1 parent e7a3b3e commit 24e9914
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ internal class ToastUIWindow: UIWindow {
toastView.leadingAnchor.constraint(equalTo: readableContentGuide.leadingAnchor, constant: 25),
toastView.trailingAnchor.constraint(equalTo: readableContentGuide.trailingAnchor, constant: -25),
toastView.bottomAnchor.constraint(equalTo: safeAreaLayoutGuide.bottomAnchor, constant: -25),
toastView.heightAnchor.constraint(equalToConstant: 64)
toastView.heightAnchor.constraint(greaterThanOrEqualToConstant: 64),
toastView.heightAnchor.constraint(lessThanOrEqualToConstant: 128)
])

toastTapRecognizer.addTarget(self, action: #selector(toastTapped))
Expand Down
3 changes: 3 additions & 0 deletions Sources/AppcuesKit/Presentation/DeepLinkHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ internal class DeepLinkHandler: DeepLinkHandling {
message = "Experience not found."
case is NetworkingError:
message = "Error loading mobile flow preview."
case let ExperienceStateMachine.ExperienceError.step(experience, _, errorMessage),
let ExperienceStateMachine.ExperienceError.experience(experience, errorMessage):
message = "Preview of \(experience.name) failed: \(errorMessage)"
default:
message = "Mobile flow preview failed."
}
Expand Down

0 comments on commit 24e9914

Please sign in to comment.