You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HTTP status code always 200 even where the WASM/WASI program exit with the system status of 1 (not zero), or where the program stopped unexpectedly.
2:19:03 AM POST / 200
✘ [ERROR] Uncaught (in promise) RuntimeError: unreachable
at __rust_start_panic
(wasm://wasm/008579b6:wasm-function[224]:0xe4d9)
at rust_panic (wasm://wasm/008579b6:wasm-function[215]:0xe29a)
✘ [ERROR] Uncaught (async) CompileError: unreachable
✘ [ERROR] Uncaught (in promise) RuntimeError: unreachable
A definately success request and response case are:
curl -X POST localhost:8787 --data '{"x": 7, "y": 9}' -v
> HTTP/1.1 200 OK
> ...
> You typed: Point { x: 7, y: 9 }
Awkward request and response case are:
curl -X POST localhost:8787 --data '{"x": 7, "y ' -v
> HTTP/1.1 200 OK <-- it should be like 404 or 500 whatever related with error code though....
> ...
> <-- because it was not responsed
✘ [ERROR] Uncaught (in promise) Error: proc_exit=1
at WASI.proc_exit_fn (index.js:748:9)
at __wasi_proc_exit
(wasm://wasm/0085943e:wasm-function[252]:0x119cd)
at _start (wasm://wasm/0085943e:wasm-function[6]:0x478)
at WASI.start (index.js:543:9)
✘ [ERROR] Uncaught (async) Error: proc_exit=1
2:48:47 AM POST / 200
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 127.0.0.1:8787...
* Connected to localhost (127.0.0.1) port 8787 (#0)
> POST / HTTP/1.1
> Host: localhost:8787
> User-Agent: curl/7.81.0
> Accept: */*
> Content-Length: 12
> Content-Type: application/x-www-form-urlencoded
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< date: Wed, 02 Aug 2023 17:43:30 GMT
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=<sth_value>"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< vary: Accept-Encoding
< cf-ray: <sth_value>
< alt-svc: h3=":443"; ma=86400
< server: cloudflare
< Connection: keep-alive
< Keep-Alive: timeout=5
< Transfer-Encoding: chunked
<
* Connection #0 to host localhost left intact
The text was updated successfully, but these errors were encountered:
seongs1024
changed the title
🐛 BUG: WASI program exit status doesn't propagate to http status code of worker
🐛 BUG: WASM program with WASI exit status doesn't propagate to http status code of worker
Aug 2, 2023
Hi @SebastiaanYN! Can you provide a minimal reproduction of your worker code? The minimal reproduction provided is only the rust code and is missing your Workers setup. Also, I noticed you're using a beta version, can you try on Wrangler's latest version please?
Hi @SebastiaanYN 👋 We haven't heard from you in a while, so we’re going to close this issue for now. If this is still a problem, please feel free to open a new issue referencing this one. Please be sure to include an updated summary and any additional requested details, followup, or context and we will revisit and investigate further. Thanks!
Which Cloudflare product(s) does this pertain to?
Workers Runtime, Wrangler core
What version(s) of the tool(s) are you using?
wrangler 0.0.0-c0d7699
What version of Node are you using?
20.5.0
What operating system are you using?
WSL 1 on Windows 11
Describe the Bug
The HTTP status code always
200
even where the WASM/WASI program exit with the system status of1
(not zero), or where the program stopped unexpectedly.A definately success request and response case are:
Awkward request and response case are:
Please provide a link to a minimal reproduction
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=635c9deb39ea0db13019d6b813b189f4
Please provide any relevant error logs
The text was updated successfully, but these errors were encountered: