(pds): only plc updateHandle when operating on a did:plc identity #2259
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I recently embarked on a journey to adopt a did:web identity, following some really great prior art from https://github.com/L11R/bsky-did-web and #2100 (comment).
I created the did:web identity no problem, but then later I wanted to change my handle to malpercio.dev instead of malpercio.pds.malpercio.dev. Alas, when running either updateHandle or updateAccountHandle, I'd be met with:
2024/02/28 06:02PM 50 Request failed with status code 404 | pid=7 hostname=a8413112136c name=xrpc-server status=404 msg=error in xrpc method com.atproto.identity.updateHandle
After some debugging, I discovered that the source of the 404 was a call to plcClient.updateHandle, with error DID not registered: did:web:malpercio.dev.
In a local running copy of my PDS, I commented out the plcClient.updateHandle call, et voil脿, my handle was updated.
This is a rather naive fix to help others not fall into this same trap, fully recognizing that the broader onboarding process for did:web could be improved, this may make a future PDS admin's life a little easier in the short term. 馃檪
Link to a discussion in the AT Protocol PDS Admins for some additional context: https://discord.com/channels/1207024379549061120/1207050328063610923/1212912254836809798