NaN
marshaling issue in setup()
method
#2808
Labels
bug
evaluation needed
proposal needs to be validated or tested before fully implementing it in k6
lower prio
Brief summary
Currently, if data that is going to return from the setup method contains a
NaN
value, k6 will fail with the error:But for instance, marshaling an object that contains
NaN
in other places doesn't cause such an error.Also, since by default, we marshal
NaN
asnull,
it's hard to figure out which property causes the issue for users.For example:
will output to logs as:
So ideally, we should either improve the error message or fix the current behavior (e.g. treat the
NaN
as null)Initially raised in community forums.
k6 version
v0.41.0
OS
linux/amd64
Docker version and image (if applicable)
No response
Steps to reproduce the problem
Given a
script.js
k6 run script.js
Expected behaviour
k6 runs as it should or explicitly say what's wrong.
Actual behaviour
The text was updated successfully, but these errors were encountered: