tweak error type

This commit is contained in:
dholms 2023-05-11 14:35:04 -05:00
parent cacc046986
commit fac68c3250

View File

@ -6,7 +6,10 @@ import { validateAuth } from './auth'
export default function (server: Server, ctx: AppContext) { export default function (server: Server, ctx: AppContext) {
server.app.bsky.feed.getFeedSkeleton(async ({ params, req }) => { server.app.bsky.feed.getFeedSkeleton(async ({ params, req }) => {
if (params.feed !== 'did:example:alice/app.bsky.feed.generator/whats-alf') { if (params.feed !== 'did:example:alice/app.bsky.feed.generator/whats-alf') {
throw new InvalidRequestError('algorithm unsupported') throw new InvalidRequestError(
'Unsupported algorithm',
'UnsupportedAlgorithm',
)
} }
/** /**
* Example of how to check auth if giving user-specific results: * Example of how to check auth if giving user-specific results: