Skip to content

fix(pds): match reference PDS RecordNotFound message string#190

Merged
ascorbic merged 3 commits into
mainfrom
fix/record-not-found-message
May 25, 2026
Merged

fix(pds): match reference PDS RecordNotFound message string#190
ascorbic merged 3 commits into
mainfrom
fix/record-not-found-message

Conversation

@ascorbic
Copy link
Copy Markdown
Owner

Summary

Follow-up to #189. The HTTP status code is now correct (400), but the Bluesky social-app's quote-detach flow does a string match on the response message:

```ts
// src/state/queries/postgate/index.ts (social-app)
if (e.message.includes(`Could not locate record:`)) {
return undefined // → fall through to createPostgateRecord
}
```

Our PDS was returning Record not found: <collection>/<rkey>, so the social-app rethrew the error instead of creating the postgate. Match the reference @atproto PDS's exact phrasing — Could not locate record: at://<did>/<collection>/<rkey>.

Test plan

  • Detach a quote in the Bluesky app against a Cirrus PDS — should succeed (creates the postgate record on first detach).

The Bluesky social-app's quote-detach flow checks
e.message.includes('Could not locate record:') to decide whether to
create a new app.bsky.feed.postgate vs. update an existing one. Match
the reference @atproto PDS message verbatim so this flow works.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 25, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
pdscheck b058fbe May 25 2026, 08:47 AM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 25, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
cirrusdocs b058fbe Commit Preview URL

Branch Preview URL
May 25 2026, 08:47 AM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 25, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
atproto-pds b058fbe May 25 2026, 08:47 AM

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 25, 2026

Open in StackBlitz

npm i https://pkg.pr.new/create-pds@190
npm i https://pkg.pr.new/@getcirrus/oauth-provider@190
npm i https://pkg.pr.new/@getcirrus/pds@190

commit: b058fbe

ascorbic added 2 commits May 25, 2026 09:45
…not locate record:'

The Bluesky social-app does a substring match on this phrase when
detaching a quote (and similar create-vs-update flows). Add it to the
existing repo-read.get-record-missing pdscheck so we catch any future
regressions in PDS implementations.
@ascorbic ascorbic enabled auto-merge (squash) May 25, 2026 08:47
@ascorbic ascorbic merged commit 5384f54 into main May 25, 2026
7 checks passed
@ascorbic ascorbic deleted the fix/record-not-found-message branch May 25, 2026 08:47
@mixie-bot mixie-bot Bot mentioned this pull request May 25, 2026
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

Successfully merging this pull request may close these issues.

1 participant