From a7373278373177518b978de16581f9c5fcea8582 Mon Sep 17 00:00:00 2001 From: dholms Date: Wed, 7 Feb 2024 15:44:54 -0600 Subject: [PATCH] fix up tests --- packages/pds/src/api/app/bsky/feed/getAuthorFeed.ts | 2 +- packages/pds/src/api/app/bsky/feed/getPostThread.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/pds/src/api/app/bsky/feed/getAuthorFeed.ts b/packages/pds/src/api/app/bsky/feed/getAuthorFeed.ts index 6144882de3e..f142a6c34e9 100644 --- a/packages/pds/src/api/app/bsky/feed/getAuthorFeed.ts +++ b/packages/pds/src/api/app/bsky/feed/getAuthorFeed.ts @@ -10,7 +10,7 @@ import { } from '../../../../read-after-write' import { pipethrough } from '../../../../pipethrough' -const METHOD_NSID = 'app.bsky.actor.getProfile' +const METHOD_NSID = 'app.bsky.feed.getAuthorFeed' export default function (server: Server, ctx: AppContext) { server.app.bsky.feed.getAuthorFeed({ diff --git a/packages/pds/src/api/app/bsky/feed/getPostThread.ts b/packages/pds/src/api/app/bsky/feed/getPostThread.ts index 5b3fa431d83..d4aec88970a 100644 --- a/packages/pds/src/api/app/bsky/feed/getPostThread.ts +++ b/packages/pds/src/api/app/bsky/feed/getPostThread.ts @@ -1,6 +1,5 @@ import { AtUri } from '@atproto/syntax' -import { AppBskyFeedGetPostThread } from '@atproto/api' -import { Headers } from '@atproto/xrpc' +import { Headers, XRPCError } from '@atproto/xrpc' import { Server } from '../../../../lexicon' import AppContext from '../../../../context' import { authPassthru } from '../../../proxy' @@ -58,7 +57,7 @@ export default function (server: Server, ctx: AppContext) { getPostThreadMunge, ) } catch (err) { - if (err instanceof AppBskyFeedGetPostThread.NotFoundError) { + if (err instanceof XRPCError && err.error === 'NotFound') { const headers = err.headers const keypair = await ctx.actorStore.keypair(requester) const local = await ctx.actorStore.read(requester, (store) => {