Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Add Status Codes to Exceptions / New Exception types #153

Open
USMCFighter94 opened this issue Oct 24, 2018 · 1 comment
Open

Add Status Codes to Exceptions / New Exception types #153

USMCFighter94 opened this issue Oct 24, 2018 · 1 comment

Comments

@USMCFighter94
Copy link

This form is for reporting issues in the Twitter Kit Android library. For all other developer questions/issues about Twitter please visit Twitter Community.

We welcome your contributions to improve the SDKs — whether adding new features, creating your own library that uses Twitter Kit, or fixing bugs you find in the code. We'd love to work with you so that Twitter Kit grows with your needs.

Feature Request

Currently, when a user backs out of the Twitter login flow, the failure method in com.twitter.sdk.android.core.Callback is called, with a TwitterException, that contains a message saying that the user cancelled. Thus, if an application using Twitter login wishes to perform a different action for cancelling vs. auth failure, an un-pretty string check of the exception message is required e.g. twitterException.message?.toLowerCase()?.contains("request was canceled").

It would be nice if status codes could be used for the different states, or if a different exception was returned for cancellations, something like TwitterAuthCancelledException. This way string parsing and checking isn't required, and client code can be more readable.

@andypiper
Copy link
Contributor

This repository is due for retirement on 31st October 2018 per the deprecation announcement, and no further updates are planned.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants