File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
packages/xl-ai/src/api/formats/base-tools Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -143,11 +143,13 @@ export function createUpdateBlockTool<T>(config: {
143143 const block = editor . getBlock ( id ) ;
144144
145145 if ( ! block ) {
146- // eslint-disable-next-line no-console
147- console . error ( "BLOCK NOT FOUND" , id ) ;
148146 return {
149147 ok : false ,
150- error : "block not found" ,
148+ error : new Error ( "Block not found (update)" , {
149+ cause : {
150+ blockId : id ,
151+ } ,
152+ } ) ,
151153 } ;
152154 }
153155
Original file line number Diff line number Diff line change @@ -62,7 +62,11 @@ export const deleteBlockTool = (
6262 if ( ! block ) {
6363 return {
6464 ok : false ,
65- error : "block not found" ,
65+ error : new Error ( "Block not found (delete)" , {
66+ cause : {
67+ blockId : id ,
68+ } ,
69+ } ) ,
6670 } ;
6771 }
6872
You can’t perform that action at this time.
0 commit comments