Gracefully handle total response failure from site - no response at all.

This commit is contained in:
Chad Curtis committed 2025-09-20 18:36:52 +00:00
1 parent 718b2f369b
commit c6617beb6d
1 file changed
+2 -2
+2 -2
View File
@@ -221,8 +221,8 @@ class FetchClient {
const response = await this.rpcClient.fetch(serializedRequest);
if (response.status !== 200) {
throw new Error(`Failed to fetch site index: ${response.status} ${response.statusText}`);
if (response?.status !== 200) {
throw new Error(`Failed to fetch site index: ${response?.status || 'Invalid response from site: ' + response} ${response?.statusText || ''}`);
}
if (response.headers["Content-Type"] !== "text/html") {