File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @browserbasehq/stagehand " : patch
3
+ ---
4
+
5
+ Improve failed act error logs
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ export class StagehandActHandler {
163
163
if ( observeResults . length === 0 ) {
164
164
return {
165
165
success : false ,
166
- message : `Failed to self heal act: No observe results found for action ` ,
166
+ message : `Failed to self heal act: Element not found. ` ,
167
167
action : actCommand ,
168
168
} ;
169
169
}
@@ -264,9 +264,15 @@ export class StagehandActHandler {
264
264
} ) ;
265
265
266
266
if ( observeResults . length === 0 ) {
267
+ this . logger ( {
268
+ category : "action" ,
269
+ message :
270
+ "No elements found to act on. Check best practices for act: https://docs.stagehand.com/basics/act" ,
271
+ level : 2 ,
272
+ } ) ;
267
273
return {
268
274
success : false ,
269
- message : `Failed to perform act: No observe results found for action ` ,
275
+ message : `Failed to perform act: No elements found to act on. ` ,
270
276
action,
271
277
} ;
272
278
}
You can’t perform that action at this time.
0 commit comments