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

T 1404619: Update new network error condition in OAuth2Error #171

Conversation

amrutakamat-mindbody
Copy link
Contributor

This pull request includes (pick all that apply):

  • Bugfixes
  • New features
  • Breaking changes
  • Documentation updates
  • Unit tests
  • Other

Summary

Handle network failures by adding a new error case for network failures and updating the error handling logic for refresh token API for this new case.

Implementation

  • Added a new error case networkFailure to the OAuth2Error enum to represent network failures.
  • Updated the errorFrom method to accept an additional error parameter and return OAuth2Error.networkFailure for network-related errors.
  • Modified the call to errorFrom to pass the new error parameter.

Test Plan

  1. Test Refresh Token API and verify if the error returning OAuth2Error.networkFailure when received network error (NSURLDomainErrorCode is < 0).

Copy link
Contributor

@AnshulMindbody AnshulMindbody left a comment

Choose a reason for hiding this comment

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

Added comment

Copy link

@rohitpradhan03 rohitpradhan03 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@AnshulMindbody AnshulMindbody left a comment

Choose a reason for hiding this comment

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

lgtm

@amrutakamat-mindbody amrutakamat-mindbody merged commit f43bf43 into main Mar 3, 2025
1 check passed
@amrutakamat-mindbody amrutakamat-mindbody deleted the Task/1404619-Handle-network-error-case-in-OAuth2Error branch March 3, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants