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

Rework errors handling #26

Merged
merged 7 commits into from
Jun 20, 2016
Merged

Rework errors handling #26

merged 7 commits into from
Jun 20, 2016

Conversation

hzalaz
Copy link
Member

@hzalaz hzalaz commented Jun 18, 2016

Authentication & Management API errors are no longer an enum but an object to provide more flexibility.

Now all request yield ErrorType that can be AuthenticationError|ManagementError or a foundation error raised during the request.

For web-based authentication, the enum WebAuthError was created with the only 3 possible errors caused by it:

  • Missing App Bundle Id
  • Web Auth Controller was not presented as modal
  • User cancelled web auth

@codecov-io
Copy link

Current coverage is 77.06%

Merging #26 into master will increase coverage by 3.35%

@@             master        #26   diff @@
==========================================
  Files            27         30     +3   
  Lines           913        894    -19   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            673        689    +16   
+ Misses          240        205    -35   
  Partials          0          0          

Powered by Codecov. Last updated by 6389b75...287f821

Now instead of an Enum, an ErrorType is supplied on each failure.

The ErrorType could be either a OS error (e.g. Foundation errors)
or Auth0 errors either returned by the API or it's components because a
configuration issue.
Fix broken cancelled flow in webauth

Extracted separated protocol for ErrorType -> NSError map
All errors listed are those  that can be of interest to the end user.
@hzalaz hzalaz merged commit 99f4fa1 into master Jun 20, 2016
@hzalaz hzalaz deleted the feature-auth-error branch June 20, 2016 17:53
@hzalaz hzalaz modified the milestone: 1.0.0-beta.3 Jun 21, 2016
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.

None yet

2 participants