Closed na-- closed 1 year ago
@na-- I tried to reproduce to fix this bug, but it seems to be fixed.
# Run your script
$ k6 run script.js
# execute curl (in another terminal)
$ curl -iX POST 'http://localhost:6565/v1/setup'
HTTP/1.1 500 Internal Server Error
Date: Fri, 18 Aug 2023 02:17:52 GMT
Content-Length: 158
Content-Type: text/plain; charset=utf-8
{
"errors": [
{
"status": "500",
"title": "Error executing setup",
"detail": "Error: bar\n\tat setup (file:///XXX/XXX/script.js:7:8(8))\n"
}
]
}
# my k6 version
$ k6 version
k6 v0.46.0 ((devel), go1.21.0, darwin/arm64)
@kmtym1998 I think the idea @na-- had was that it should also print the exception in the k6 output, not just in the response to curl
@mstoykov
I see. I would like to try to fix this. Can I work on?
If you run this script:
And execute
curl -iX POST 'http://localhost:6565/v1/setup'
in another terminal, you would not see the script errorbar
in the terminal, but you'd seefoo
.