Skip to content

Commit

Permalink
Capture error in Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
elsmr committed Mar 6, 2024
1 parent c6b9f90 commit eeae05e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/editor-ui/src/Interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ declare global {
};
// eslint-disable-next-line @typescript-eslint/naming-convention
Cypress: unknown;

Sentry?: {
captureException: (error: Error, metadata?: unknown) => void;
};
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ const coloringStateField = StateField.define<DecorationSet>({
});
}
}
} catch (error) {}
} catch (error) {
window?.Sentry?.captureException(error);
}

return colorings;
},
Expand Down

0 comments on commit eeae05e

Please sign in to comment.