Skip to content

Allow to set an optional GitHub API token to circumvent rate limiting #90

@dkundel

Description

@dkundel

In #86 we added a better error message for GitHub API failures.

However, if the rate limit error is thrown the error message they get is not the most useful one for people. I'd be in favor of catching that one specifically and replying with something like this:

We are sorry but we failed fetching the requested template from GitHub because your IP address has been rate limited. Please try the following to resolve the issue:
- Change your WiFi or make sure you are not connected to a VPN that might cause the rate limiting

If the issue persists you can try one of the two options:
- Get a GitHub developer token following https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line (no permissions needed) and add it as `TWILIO_SERVERLESS_GITHUB_TOKEN` to your environment variables
- Wait for a few minutes up to an hour and try again.

For this we'd have to make sure to pass TWILIO_SERVERLESS_GITHUB_TOKEN to the GitHub API if it's available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions