-
Notifications
You must be signed in to change notification settings - Fork 154
Open
Description
Description:
Currently, if a GitHub API query fails (e.g., invalid project name, network error), the CLI throws an unhandled promise rejection or displays an unclear error.
We should catch all promise rejections and provide a friendly, descriptive error message to help the user understand the problem.
Steps to Reproduce:
- Install the CLI globally: (npm i -g good-first-issue)
- Run a query with a non-existent project: (good-first-issue thisisntarealprojectorgithuborg)
Expected Behavior:
- The CLI should display a clear error message:
Error: Unable to fetch issues for "thisisntarealprojectorgithuborg".
Please check the project name or your network connection.
- No unhandled promise rejection should appear.
Actual Behavior:
The CLI throws an unhandled promise rejection or crashes.
Environment:
- Node.js >= 8.0.0
- npm >= 5.0.0
- OS: Any
Project version: Latest from main branch
Proposed Solution (optional):
- Wrap all API calls in try/catch or use .catch() for promises.
- Add descriptive error messages for common failures (invalid project, network issues, rate limits).
Kabshah
Metadata
Metadata
Assignees
Labels
No labels