fix: search sync + sentry errors issues (#37912)
* fix: search sync + sentry errors issues Fixes two issues: 1. Search sync: The embedded content now includes denormalized examples, so the examples codegen needs to be run before embeddings are created. Otherwise, the GitHub Action will fail because it cannot find the examples to use for content inclusion. 2. Sentry errors on pages that fail to load: Sentry errors were being sent for genuine 404s because the check for FileNotFoundErrors was wrong. The error that is caught is wrapped in a new Error by Result.unwrap(), so it's the child of this error, error.cause, that is potentially a FileNotFoundError, not the error itself. * fix: remove double processing of mdx
This commit is contained in:
5
.github/workflows/search.yml
vendored
5
.github/workflows/search.yml
vendored
@@ -45,6 +45,7 @@ jobs:
|
||||
sparse-checkout: |
|
||||
apps/docs
|
||||
apps/www/.env.local.example
|
||||
examples
|
||||
supabase
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
@@ -63,7 +64,9 @@ jobs:
|
||||
- name: Update embeddings
|
||||
working-directory: ./apps/docs
|
||||
if: ${{ !inputs.refresh }}
|
||||
run: pnpm run embeddings
|
||||
run: |
|
||||
pnpm run codegen:examples
|
||||
pnpm run embeddings
|
||||
|
||||
- name: Refresh embeddings
|
||||
working-directory: ./apps/docs
|
||||
|
||||
Reference in New Issue
Block a user