Skip to content

Commit

Permalink
LetsEncrypt._selfChallengeTest: add log messsages.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmpassos committed May 28, 2023
1 parent 0981f26 commit 3cd3b8e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/src/letsencrypt.dart
Expand Up @@ -213,7 +213,14 @@ class LetsEncrypt {

_logMsg('Self test URL: $url');

var content = await getURL(Uri.parse(url));
String? content;
try {
content = await getURL(Uri.parse(url));
} catch (e, s) {
_logMsg(e, s);
_logMsg("Self test request error for URL: $url");
return false;
}

if (content == null || content.isEmpty) {
_logMsg('Self test: EMPTY');
Expand Down Expand Up @@ -402,8 +409,8 @@ class LetsEncrypt {
return ok
? CheckCertificateStatus.okRefreshed
: CheckCertificateStatus.error;
} catch (e) {
_logMsg(e);
} catch (e, s) {
_logMsg(e, s);
return CheckCertificateStatus.error;
}
}
Expand Down

0 comments on commit 3cd3b8e

Please sign in to comment.