ux: better error message renewing certificate #1137
Massimo Melina committed
Dec 9, 2025 at 12:47 UTC
6035cc5e043ec2db2d1dfd27b6b4b6395a039344
2 files changed
+3
-3
shared/index.ts
-1
@@ -197,7 +197,6 @@ export async function copyTextToClipboard(text: string) {
197
}
198
}
199
200
-
200
export function downloadFileWithContent(name: string, content: Blob | string) {
201
const blob = content instanceof Blob ? content : new Blob([content], {type: 'text/plain'})
202
const a = document.createElement('a')
src/acme.ts
+3
-2
@@ -99,8 +99,9 @@ async function generateSSLCert(domain: string, email?: string, altNames?: string
99
export const makeCert = debounceAsync(async (domain: string, email?: string, altNames?: string[]) => {
100
if (!domain) return new ApiError(HTTP_BAD_REQUEST, 'bad params')
101
const res = await generateSSLCert(domain, email, altNames).catch(e => {
102
- throw !e.message?.includes('not match this challenge') ? e // another acme server?
103
- : Error("a different server is responding on port 80 of your domain(s)")
102
+ throw e.message?.includes('Timeout') ? Error("ensure your router is forwarding port 80 correctly")
103
+ : e.message?.includes('not match this challenge') ? Error("a different server is responding on port 80 of your domain(s)")
104
+ : e
105
})
106
const CERT_FILE = 'acme.cer'
107
const KEY_FILE = 'acme.key'