Skip to content

Commit

Permalink
Capture error instead of object in explorerViews (#4516)
Browse files Browse the repository at this point in the history
Otherwise Sentry won't group the event correctly.
  • Loading branch information
rakyi authored Feb 3, 2025
1 parent ff32ab8 commit 9d1e6c2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions baker/algolia/utils/explorerViews.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,12 @@ async function enrichRecordWithIndicatorData(

const indicatorInfo = indicatorMetadataDictionary[firstYIndicator]
if (!indicatorInfo) {
await logErrorAndMaybeCaptureInSentry({
name: "ExplorerViewIndicatorMissing",
message: `Explorer with slug "${record.explorerSlug}" has a view with missing indicator metadata: ${record.viewQueryParams}.`,
})
await logErrorAndMaybeCaptureInSentry(
new Error(
`Explorer with slug "${record.explorerSlug}" has a view ` +
`with missing indicator metadata: ${record.viewQueryParams}.`
)
)
return
}

Expand Down

0 comments on commit 9d1e6c2

Please sign in to comment.