Skip to content

Commit 12eb534

Browse files
Abdkhan14Abdullah Khan
authored andcommitted
feat(trace-eap-waterfall): Triggering capture exception only when query is enabled (#90893)
Fixes JAVASCRIPT-2ZX1 Co-authored-by: Abdullah Khan <[email protected]>
1 parent a586e16 commit 12eb534

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

static/app/views/explore/hooks/useTraceItemDetails.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ export function useTraceItemDetails(props: UseTraceItemDetailsProps) {
7777
const project = useProjectFromId({project_id: props.projectId});
7878
const enabled = (props.enabled ?? true) && !!project;
7979

80-
if (!project) {
80+
// Only capture exception if the project is not found and the query is enabled.
81+
if ((props.enabled ?? true) && !project) {
8182
captureException(
8283
new Error(`Project "${props.projectId}" not found in useTraceItemDetails`)
8384
);

0 commit comments

Comments
 (0)