Skip to content

Commit

Permalink
fix(cli): add descriptive message for protocol timeout (#75)
Browse files Browse the repository at this point in the history
Signed-off-by: Rajkumar S <rajkumaar2304@icloud.com>
  • Loading branch information
rajkumaar23 committed Aug 8, 2020
1 parent 492bd53 commit 6db4833
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/is-website-vulnerable.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ function getLighthouseOptions() {

process.exit(0)
} catch (error) {
console.error(`\nError: ${error.message}\n`)
const errorMessage =
error.code === 'PROTOCOL_TIMEOUT'
? 'The request has timed out. Chrome is taking too long to respond.'
: error.message
console.error(`\nError: ${errorMessage}\n`)
console.error('Usage:\n is-website-vulnerable https://www.google.com\n\n')
process.exit(1)
}
Expand Down

0 comments on commit 6db4833

Please sign in to comment.