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

Add Status Codes to Exceptions / New Exception types #153

@USMCFighter94

Description

@USMCFighter94

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions