Skip to content

Commit

Permalink
catch bluesky's down oauth service errors
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Dec 10, 2024
1 parent 1412e75 commit 530b14c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion js/bluesky.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,16 @@ 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 common service availability errors
if (error.message && (
error.message.includes('invalid_client_metadata') ||
error.message.includes('Failed to resolve OAuth server metadata for issuer: bsky.social')
)) {
this.ui.updateLoginState(false, 'Bluesky service appears to be down. 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 530b14c

Please sign in to comment.