Add handling for birthdate prefs write failure (#9508)

This commit is contained in:
Eric Bailey
2025-12-08 17:43:38 -06:00
committed by GitHub
parent 296d22d626
commit a0c4a6b307
3 changed files with 35 additions and 9 deletions
+9
View File
@@ -18,6 +18,15 @@ export function cleanError(str: any): string {
) {
return t`The server appears to be experiencing issues. Please try again in a few moments.`
}
/**
* @see https://github.com/bluesky-social/atproto/blob/255cfcebb54332a7129af768a93004e22c6858e3/packages/pds/src/actor-store/preference/transactor.ts#L24
*/
if (
str.includes('Do not have authorization to set preferences') &&
str.includes('app.bsky.actor.defs#personalDetailsPref')
) {
return t`You cannot update your birthdate while using an app password. Please sign in with your main password to update your birthdate.`
}
if (str.includes('Bad token scope') || str.includes('Bad token method')) {
return t`This feature is not available while using an App Password. Please sign in with your main password.`
}