Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ABW-2065] Dont show Cancelled error to user #721

Merged
merged 2 commits into from
Sep 6, 2023

Conversation

CyonAlexRDX
Copy link
Contributor

@CyonAlexRDX CyonAlexRDX commented Sep 6, 2023

Jira ticket: ABW-2065

Yes oooops, I used wrong git branch name, c'est la vie

Description

Prevent scheduling NSError where code is NSURLErrorCancelled also prevent scheduling of CancellationError

Video

BEFORE

RPReplay_Final1693995609.MP4

AFTER

ABW-2065_prevent_display_of_error_alert_for_cancellation_errors.mov

PR submission checklist

  • I have tested account to account transfer flow and have confirmed that it works

@CyonAlexRDX CyonAlexRDX changed the title [ABW-2065] [ABW-2065] Dont show Cancelled error to user Sep 6, 2023
@@ -9,6 +10,21 @@ extension ErrorQueue: DependencyKey {
return Self(
errors: { errors.share().eraseToAnyAsyncSequence() },
schedule: { error in

if error is CancellationError {
loggerGlobal.warning("Suppressed `CancellationError`, i.e. preventing scheduling of this error on the ErrorQueue")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess we wanna suppress these errors, not relevant to user... right?

nsError.domain == NSURLErrorDomain,
nsError.code == NSURLErrorCancelled
{
loggerGlobal.warning("Suppressed NSError with domain `NSURLErrorDomain`, i.e. preventing scheduling of this error on the ErrorQueue. \nDetails: code: \(nsError.code) - description: \"\(nsError.localizedDescription)\"")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Contrary to what my video in PR discription said, I updated to only suppress when nsError.code == NSURLErrorCancelled

Copy link
Contributor

@kugel3 kugel3 left a comment

Choose a reason for hiding this comment

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

Is this a temporary fix, or is it really the right thing to do, to suppress the errors? Should they have been sent in the first place?

@CyonAlexRDX CyonAlexRDX merged commit d39d86b into main Sep 6, 2023
5 checks passed
@CyonAlexRDX CyonAlexRDX deleted the ABW-2965_dont_show_cancellation_errors branch September 6, 2023 12:19
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants