Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 51a2f1e

Browse files
committed
Refactor to allow for more error handling
1 parent d7f338b commit 51a2f1e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

common/js_handle.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,12 @@ func (h *BaseJSHandle) Dispose() {
8484
// context. The reason the context would be closed is due to the
8585
// iteration ending and therefore the associated browser and its assets
8686
// will be automatically deleted.
87-
if !errors.Is(err, context.Canceled) {
88-
k6ext.Panic(h.ctx, "dispose: %w", err)
87+
if errors.Is(err, context.Canceled) {
88+
h.logger.Debugf("BaseJSHandle:Dispose", "%v", err)
89+
return
8990
}
91+
92+
k6ext.Panic(h.ctx, "dispose: %w", err)
9093
}
9194
}
9295

0 commit comments

Comments
 (0)