Skip to content

Commit 6dfe20f

Browse files
heiskrCopilot
andauthored
Guard against missing req.body in AI search proxy (#60287)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c2db6d7 commit 6dfe20f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/search/lib/ai-search-proxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { ExtendedRequest } from '@/types'
77
import { handleExternalSearchAnalytics } from '@/search/lib/helpers/external-search-analytics'
88

99
export const aiSearchProxy = async (req: ExtendedRequest, res: Response) => {
10-
const { query, version } = req.body
10+
const { query, version } = req.body ?? {}
1111

1212
const errors = []
1313

0 commit comments

Comments
 (0)