Skip to content

Commit 34a5937

Browse files
authored
Inform user about common causes of invalid let's encrypt order status (#290)
1 parent d5022b7 commit 34a5937

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/acme.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use anyhow::{Context, anyhow};
77
use axum::{Router, extract::Path, routing::get};
88
use instant_acme::{
99
Account, AccountCredentials, ChallengeType, Identifier, LetsEncrypt, NewAccount, NewOrder,
10-
RetryPolicy,
10+
OrderStatus, RetryPolicy,
1111
};
1212
use serde::Deserialize;
1313
use tokio::{
@@ -291,6 +291,13 @@ pub async fn run_acme_http01(
291291
}
292292

293293
let status = validation_result?;
294+
if status == OrderStatus::Invalid {
295+
return Err(anyhow!(
296+
"Domain validation failed. The ACME server could not verify ownership of '{domain}'. \
297+
Common causes: DNS not pointing to this server, a firewall blocking port 80, \
298+
or the wrong domain name was used. Please fix the issue and try again."
299+
));
300+
}
294301
info!("Domain validation complete, order status: {status:?}");
295302

296303
// Domain validated; finalizing order and retrieving the certificate.

0 commit comments

Comments
 (0)