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:
Charis
2025-08-13 16:50:30 -04:00
committed by GitHub
parent 97d746b665
commit 9551315f6a
3 changed files with 8 additions and 3 deletions

View File

@@ -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