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

improvement: Added error catching for abuseLimit and rateLimit. #5

Closed
wants to merge 2 commits into from
Closed

Conversation

jacobrreed
Copy link

Added onRateLimit and onAbuseLimit catch for api call. If user exceeds limits, it will alert the user via console.log() and exit gracefully. Updated examples to handle this properly since data will come back undefined. Updated README to reflect this change as well.
Closes #132

…rints a message alerting the user then exits gracefully. Updated README to reflect this change.
@jacobrreed
Copy link
Author

Getting check errors, unsure why though, it only says exit code 1.

@jacobrreed
Copy link
Author

Seems to be Prettier adding semicolons and tabs. Do you know if there is a way around this or a way to set it up to pass checks?

@jacobrreed
Copy link
Author

jacobrreed commented Sep 20, 2019

Fixed formatting errors, but I am having issues passing the tests because of the octokit import using

const Octokit = require('@octokit/rest').plugin( require('@octokit/plugin-throttling') )

@bnb
Copy link
Member

bnb commented Sep 23, 2019

ah, so this project uses StandardJS which is a relatively opinionated set of rules on top of ESLint – it happens to be 100% incompatible with Prettier 😅

You should be able to run the linter locally, but if not you could do:

npm install standard -g
standard --fix

After you run that, there should be no console output + a bunch of file changes. If there is console output, there's some changes it couldn't automatically make.

For now, I'll check out the branch and see what we can do 👍

@jacobrreed
Copy link
Author

ah ok lol I'll give it a try.

@bnb
Copy link
Member

bnb commented Sep 23, 2019

Also, I was getting the module not found error at first – re-ran npm install to fetch the updated modules and it worked 👍

@jacobrreed jacobrreed closed this Oct 8, 2021
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.

2 participants