Add handling for birthdate prefs write failure (#9508)
This commit is contained in:
@@ -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.`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user