Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve user error messages on panic #4399

Open
inancgumus opened this issue Feb 6, 2023 · 1 comment
Open

Improve user error messages on panic #4399

inancgumus opened this issue Feb 6, 2023 · 1 comment

Comments

@inancgumus
Copy link
Member

This comment suggested a way to use the mapping layer for terminal errors (panic, etc.). The idea is that we will bubble up errors to the mapping layer, where it can decide whether to panic or to return an error to Goja.

We worked on a POC for a solution here. We now want to find a way to improve user error messages when a panic occurs. This is discussed in detail here.

We can use this issue to talk more and find a better solution.

@ankur22
Copy link
Contributor

ankur22 commented Feb 6, 2023

Thanks for raising this. To get the discussion started, an option could be to ask k6 to create a new API (for example AbortWholeTestRun(reason string)) that we can call (this was suggested to us as an option a while back when wanting to abort the whole process). This could be useful for a few reasons:

  1. Current k6ext.Panic doesn't allow k6 to cleanup anything they may want to do before aborting.
  2. This would help us with a cleaner error message for the user.
  3. No panics.

@inancgumus inancgumus transferred this issue from grafana/xk6-browser Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants