Skip to content

Commit

Permalink
add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Dec 10, 2024
1 parent 1412e75 commit 910c723
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/bluesky.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'}`);
}
}
}

Expand Down

0 comments on commit 910c723

Please sign in to comment.