From 1e531a10e69b17cfc9731e6c05500031cbd11c3e Mon Sep 17 00:00:00 2001 From: phil Date: Tue, 10 Feb 2026 11:28:21 -0500 Subject: [PATCH] don't require version to be at _health and take it from describeServer first if it's in there --- index.html | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index b96eed3..0338e6b 100644 --- a/index.html +++ b/index.html @@ -228,8 +228,10 @@ } let query = window.SimpleQuery(pds); + let version; try { this.description = await query('com.atproto.server.describeServer'); + version = this.description.version; } catch (e) { if (window.isXrpcErr(e)) { this.error = e.error; @@ -238,18 +240,17 @@ console.error(e); } } - let health - try { - health = await query('_health'); - this.version = health.version; - } catch (e) { - if (window.isXrpcErr(e)) { - this.error = e.error; - } else { - this.error = 'Failed to reach (see console)'; - console.error(e); + // fall back on /xrpc/_health for version if it's not in describeServer + if (!version) { + try { + const health = await query('_health'); + version = health.version; + } catch (e) { + console.warn("could not get version from describeServer or _health"); } } + this.version = version; + let accountsRes; try { accountsRes = await query('com.atproto.sync.listRepos', { -- 2.51.2