Skip to content

Commit

Permalink
update error language
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Jan 24, 2024
1 parent 1de5b95 commit a3cf3a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/pds/src/api/com/atproto/server/createAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ export default function (server: Server, ctx: AppContext) {
if (ctx.cfg.phoneVerification.required && ctx.twilio) {
if (!input.body.verificationPhone) {
throw new InvalidRequestError(
'Phone number verification is required on this server and none was provided.',
`Text verification is now required on this server. Please make sure you're using the latest version of the Bluesky app.`,
'InvalidPhoneVerification',
)
} else if (!input.body.verificationCode) {
throw new InvalidRequestError(
'Phone number verification is required on this server and none was provided.',
`Text verification is now required on this server. Please make sure you're using the latest version of the Bluesky app.`,
'InvalidPhoneVerification',
)
}
Expand Down
6 changes: 3 additions & 3 deletions packages/pds/tests/phone-verification.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe('phone verification', () => {
it('does not allow signup with out a code', async () => {
const attempt = createAccountWithCode()
await expect(attempt).rejects.toThrow(
'Phone number verification is required on this server and none was provided.',
`Text verification is now required on this server. Please make sure you're using the latest version of the Bluesky app.`,
)
})

Expand All @@ -125,11 +125,11 @@ describe('phone verification', () => {
const bobCode = await requestCode(bobNumber)
const attempt = createAccountWithCode(undefined, bobCode)
await expect(attempt).rejects.toThrow(
'Phone number verification is required on this server and none was provided.',
`Text verification is now required on this server. Please make sure you're using the latest version of the Bluesky app.`,
)
const attempt2 = createAccountWithCode(bobNumber, undefined)
await expect(attempt2).rejects.toThrow(
'Phone number verification is required on this server and none was provided.',
`Text verification is now required on this server. Please make sure you're using the latest version of the Bluesky app.`,
)
})

Expand Down

0 comments on commit a3cf3a3

Please sign in to comment.