-
Notifications
You must be signed in to change notification settings - Fork 2
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
LCH-5237: Outputting information about exception. #12
base: main
Are you sure you want to change the base?
Conversation
@@ -47,14 +47,16 @@ protected function execute(InputInterface $input, OutputInterface $output) { | |||
} | |||
// @TODO: This needs to be fixed. The 'https' is not present in the URL. | |||
if (strpos($url, 'https') !== 0) { | |||
$output->writeln("<warning>This site does not have an SSL Certificate.</warning>"); | |||
$output->writeln("<warning>This site does not have an SSL Certificate or isn't publicly accessible.</warning>"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this message Site isn't publicly accessible should be added inside catch because this condition just checks if site url contains https or not.
@@ -47,14 +47,16 @@ protected function execute(InputInterface $input, OutputInterface $output) { | |||
} | |||
// @TODO: This needs to be fixed. The 'https' is not present in the URL. | |||
if (strpos($url, 'https') !== 0) { | |||
$output->writeln("<warning>This site does not have an SSL Certificate.</warning>"); | |||
$output->writeln("<warning>This site does not have an SSL Certificate or isn't publicly accessible.</warning>"); | |||
return 0; | |||
} | |||
try { | |||
$cert = $this->getCertByHostname($url); | |||
} | |||
catch (\Exception $e) { | |||
$output->writeln("<warning>Something went wrong getting the SSL cert of $url</warning>"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$output->writeln("<warning>Something went wrong getting the SSL cert of $url</warning>"); | |
$output->writeln("<warning>Something went wrong getting the SSL cert of $url or it's not publicly accessible.</warning>"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a minor comment.
No description provided.