Files
bun.sh/test/js/bun/http/error-response.js
Dylan Conway ae7bc37e94 fix iterating stack trace (#3600)
* `i + 1` and remove `defer`

* a test

* fix test
2023-07-11 12:48:32 -07:00

9 lines
184 B
JavaScript

const s = Bun.serve({
fetch(req, res) {
s.stop(true);
throw new Error("1");
},
port: 0,
});
fetch(`http://${s.hostname}:${s.port}`).then(res => console.log(res.status));