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 {
163163 if ( observeResults . length === 0 ) {
164164 return {
165165 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. ` ,
167167 action : actCommand ,
168168 } ;
169169 }
@@ -264,9 +264,15 @@ export class StagehandActHandler {
264264 } ) ;
265265
266266 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+ } ) ;
267273 return {
268274 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. ` ,
270276 action,
271277 } ;
272278 }
You can’t perform that action at this time.
0 commit comments