ps-analysis-tool icon indicating copy to clipboard operation
ps-analysis-tool copied to clipboard

Adding on the terminal the feedback when audit url returns a server error.

Open fellyph opened this issue 1 year ago • 0 comments

Feature Request

Description: Some steps are listed during the PSAT CLI audit process on the terminal. If the audited URL receives a server error response during this process. The PSAT CLI should output a warning on the terminal about this response, for example:

normal audit: $ psat https://example.com

Output:

fellyph@PH-Mac ~ % psat https://example.com   

Warning: This URL returned a 403 response

⠴ Analyzing cookies on the first site visit

verbose audit: $ psat https://example.com -v

Output:

Analyzing cookies on the first site visit
    Browser initialized
    Page opened
    Attaching network event listeners to the page
    Finished attaching network event listeners
    Starting navigation to URL: https://example.com
    Warning: Server response 403
    Navigation did not finish in 10 seconds moving on to scrolling
    Scrolling on URL: https://globo.com
✓ Done analyzing cookies!

If the error occurs, the previous audit message should be kept. The warning message can be returned in yellow to bring the user's attention.

Motivation: Displaying that message, the users can decide whether to continue with the audit or not with the process and already know that the server returned an error before opening the generated report.

User Story: As a user, I want to have feedback on the terminal about server errors so that he/she can decide whether to continue with the audit.

Acceptance Criteria:

  • [ ] Inspect a URL with server error response
  • [ ] Get a warning on the regular and verbose audit mode
  • [ ] The text from the audit should be kept to keep the history of the process
  • [ ] The behaviour should be present on single URL, sitemap and CSV audits

fellyph avatar Aug 14 '24 12:08 fellyph