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

PSAT CLI: Enhanced Error Reporting #819

Open
5 tasks
gagan0123 opened this issue Aug 26, 2024 · 0 comments
Open
5 tasks

PSAT CLI: Enhanced Error Reporting #819

gagan0123 opened this issue Aug 26, 2024 · 0 comments
Assignees
Milestone

Comments

@gagan0123
Copy link
Collaborator

Feature Request

Description:

Improve error reporting in the PSAT CLI to provide more detailed and helpful information when errors occur.

Motivation:

The current error reporting for the PSAT CLI is limited and lacks crucial details for efficient debugging. Users often struggle to understand the root cause of errors, which hampers troubleshooting and resolution. Providing more detailed error reports would significantly improve the user experience and make it easier for both users and the PSAT team to diagnose and fix issues.

User Story:

As a PSAT CLI user, I want to receive detailed error reports that include system information, command context, and relevant technical details so that I can quickly troubleshoot issues and determine the appropriate course of action.

Acceptance Criteria:

  • When an error occurs, the CLI output should include the following system information:
    • PSAT CLI Version
    • Node.js Version
    • NPM Version
    • Operating System
    • Puppeteer Version
  • The error report should provide context about the command execution:
    • The specific command that was executed
    • The target URL or sitemap being analyzed
    • CLI options used
    • Timestamp of the error
  • If applicable, technical details related to the error should be included:
    • Network request or response errors list
    • Stack trace
  • Error messages should be user-friendly.
  • Suggested actions or troubleshooting steps should be provided based on the error type.

Additional Information:

An example of an enhanced error report:

PSAT CLI Error Report

Timestamp: 2024-08-23 14:30:15 UTC

Command: psat --url https://www.example.com

Target URL: https://www.example.com
CLI Options: -u https://www.example.com

System Information:
  - PSAT Version: 0.10.0
  - Node Version: v18.20.3
  - NPM Version: v10.7.0
  - OS: Pop!_OS 22.04 LTS
  - Puppeteer Version: 22.14.0

Error Message: Failed to fetch the URL. Network error.

Stack Trace:
  ... (Detailed stack trace here) ...

Suggested Actions:
  - Check your internet connection.
  - Verify the URL is valid.
  - If the issue persists, please report this error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

4 participants