File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ const upsertNodeSchemaToContent = async ({
205205 } ) ;
206206 if ( error ) {
207207 console . error ( "upsert_content failed:" , error ) ;
208+ throw new Error ( error . message ) ;
208209 }
209210} ;
210211
@@ -282,14 +283,16 @@ export const upsertNodesToSupabaseAsContentWithEmbeddings = async (
282283 console . error (
283284 `upsertNodesToSupabaseAsContentWithEmbeddings: Embedding service failed – ${ message } ` ,
284285 ) ;
285- return ;
286+ throw new Error ( message ) ;
286287 }
287288
288289 if ( nodesWithEmbeddings . length !== allNodeInstancesAsLocalContent . length ) {
289290 console . error (
290291 "upsertNodesToSupabaseAsContentWithEmbeddings: Mismatch between node and embedding counts." ,
291292 ) ;
292- return ;
293+ throw new Error (
294+ "upsertNodesToSupabaseAsContentWithEmbeddings: Mismatch between node and embedding counts." ,
295+ ) ;
293296 }
294297
295298 const chunk = < T > ( array : T [ ] , size : number ) : T [ ] [ ] => {
@@ -312,8 +315,7 @@ export const upsertNodesToSupabaseAsContentWithEmbeddings = async (
312315 } ) ;
313316
314317 if ( error ) {
315- console . error ( `upsert_content failed for batch ${ idx + 1 } :` , error ) ;
316- throw error ;
318+ throw new Error ( `upsert_content failed for batch ${ idx + 1 } :` , error ) ;
317319 }
318320 }
319321 } ;
@@ -363,6 +365,7 @@ const upsertUsers = async (
363365 } ) ;
364366 if ( error ) {
365367 console . error ( "upsert_accounts_in_space failed:" , error ) ;
368+ throw error ;
366369 }
367370} ;
368371
You can’t perform that action at this time.
0 commit comments