Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xrpc: Wrong error type returned when repo is not found #1083

Closed
mackuba opened this issue May 25, 2024 · 2 comments
Closed

xrpc: Wrong error type returned when repo is not found #1083

mackuba opened this issue May 25, 2024 · 2 comments

Comments

@mackuba
Copy link

mackuba commented May 25, 2024

Testing on getLatestCommit at least - when called with a DID of a repo that doesn't exist (was deleted?), it returns:

https://atproto.brid.gy/xrpc/com.atproto.sync.getLatestCommit?did=did:plc:qwerty

{
    "error": "InvalidRequest",
    "message": "Repo None not found"
}

On Bluesky servers, it returns:

https://amanita.us-east.host.bsky.network/xrpc/com.atproto.sync.getLatestCommit?did=did:plc:qwerty

{
    "error": "RepoNotFound",
    "message": "Could not find root for DID: did:plc:qwerty"
}

The error type seems to be specified in the lexicon:

https://github.com/bluesky-social/atproto/blob/main/lexicons/com/atproto/sync/getLatestCommit.json#L30

"errors": [{ "name": "RepoNotFound" }]
@snarfed
Copy link
Owner

snarfed commented May 25, 2024

Good point, thanks!

snarfed added a commit to snarfed/lexrpc that referenced this issue Jun 10, 2024
snarfed added a commit to snarfed/arroba that referenced this issue Jun 10, 2024
@snarfed
Copy link
Owner

snarfed commented Jun 10, 2024

Done!

@snarfed snarfed closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants