File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
apps/roam/src/components/canvas Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import {
2626import { AddPullWatch } from "roamjs-components/types" ;
2727import { LEGACY_SCHEMA } from "~/data/legacyTldrawSchema" ;
2828import sendErrorEmail from "~/utils/sendErrorEmail" ;
29+ import getCurrentUserDisplayName from "roamjs-components/queries/getCurrentUserDisplayName" ;
2930
3031const THROTTLE = 350 ;
3132
@@ -141,8 +142,18 @@ export const useRoamStore = ({
141142 shapeUtils : [ ...defaultShapeUtils , ...customShapeUtils ] ,
142143 bindingUtils : [ ...defaultBindingUtils , ...customBindingUtils ] ,
143144 } ) ;
144- } catch ( error ) {
145+ } catch ( e ) {
146+ const error = e as Error ;
145147 console . error ( "Failed to create store:" , error ) ;
148+ sendErrorEmail ( {
149+ error,
150+ type : "Failed to create TLStore" ,
151+ context : {
152+ pageUid,
153+ user : getCurrentUserDisplayName ( ) ,
154+ initialSnapshot,
155+ } ,
156+ } ) . catch ( ( ) => { } ) ;
146157 return null ;
147158 }
148159
You can’t perform that action at this time.
0 commit comments