goja icon indicating copy to clipboard operation
goja copied to clipboard

errors's `stack` property always include `Error`/`GoError`/something else

Open mstoykov opened this issue 2 years ago • 0 comments

While I was making k6's promise rejection handling a bit better I noticed that I get double GoError in all our messages as I get the "error type" both in the message and the stack.

You can see that in this test. Where the final message will be:

Uncaught (in promise) GoError: some error: GoError
      at go.k6.io/k6/js/eventloop_test.TestEventLoopRejectGoError.func1 (native)
      at <eval>:1:30(1)
      at native

I am wondering if the stack should have this at all :thinking: after all it is accessed by accessing stack so :shrug:

mstoykov avatar Oct 19 '22 08:10 mstoykov