File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -94,8 +94,7 @@ const CreateRelationDialog = ({
9494 // should not happen at this point, since the pattern was vetted at input.
9595 internalError ( {
9696 type : "create-relation-error" ,
97- error :
98- "Create Relation dialog: Could not find identify node downstream" ,
97+ error : "Create Relation dialog: Could not identify node downstream" ,
9998 } ) ;
10099 return null ;
101100 }
@@ -275,7 +274,7 @@ const prepareRelData = (
275274 if ( ! nodeSchema ) {
276275 // should not happen at this point, since the pattern was vetted at input.
277276 internalError ( {
278- error : "Create Relation dialog: Could not find identify node downstream" ,
277+ error : "Create Relation dialog: Could not identify node downstream" ,
279278 type : "create-relation-error" ,
280279 } ) ;
281280 return [ ] ;
Original file line number Diff line number Diff line change @@ -136,10 +136,10 @@ export const useRoamStore = ({
136136
137137 const handleStoreError = ( {
138138 error,
139- errorMessage ,
139+ type ,
140140 } : {
141141 error : Error ;
142- errorMessage : string ;
142+ type : string ;
143143 } ) : void => {
144144 setError ( error ) ;
145145 setLoading ( false ) ;
@@ -148,7 +148,7 @@ export const useRoamStore = ({
148148 : 0 ;
149149 internalError ( {
150150 error,
151- type : "roam-store-error" ,
151+ type,
152152 context : {
153153 pageUid,
154154 snapshotSize,
@@ -169,7 +169,7 @@ export const useRoamStore = ({
169169 } catch ( e ) {
170170 handleStoreError ( {
171171 error : e as Error ,
172- errorMessage : "Failed to create TLStore " ,
172+ type : "tlstore-creation-failure " ,
173173 } ) ;
174174 return null ;
175175 }
@@ -180,7 +180,7 @@ export const useRoamStore = ({
180180 } catch ( e ) {
181181 handleStoreError ( {
182182 error : e as Error ,
183- errorMessage : "Failed to migrate snapshot" ,
183+ type : "snapshot-migration-failure " ,
184184 } ) ;
185185 return null ;
186186 }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ const internalError = ({
1414 type ?: string ;
1515 userMessage ?: string ;
1616 context ?: Properties ;
17- } ) => {
17+ } ) : void => {
1818 if ( process . env . NODE_ENV === "development" ) {
1919 console . error ( error , context ) ;
2020 } else {
You can’t perform that action at this time.
0 commit comments