From 910c723e10c4f2755855a4e26170ae1a44041943 Mon Sep 17 00:00:00 2001 From: Chrissy LeMaire Date: Tue, 10 Dec 2024 12:57:40 +0100 Subject: [PATCH] add error message --- js/bluesky.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/bluesky.js b/js/bluesky.js index 4eba254..5a1ae2b 100644 --- a/js/bluesky.js +++ b/js/bluesky.js @@ -127,7 +127,13 @@ class BlueskyService { await this.auth.signIn(handle); } catch (error) { console.error('[Bluesky] Sign in failed:', error); - this.ui.updateLoginState(false, `Sign in failed: ${error.message || 'Please try again'}`); + + // Check for invalid_client_metadata error + if (error.message && error.message.includes('invalid_client_metadata')) { + this.ui.updateLoginState(false, 'Bluesky\'s authentication service appears to be down, as it\'s returning the dreaded "invalid_client_metadata" error. Please try again in a few minutes.'); + } else { + this.ui.updateLoginState(false, `Sign in failed: ${error.message || 'Please try again'}`); + } } }