Closed stan-irl closed 1 year ago
Hi. In my local testing with a server that returns 503 on every request, I can see following error:
js api error: TypeError: Failed to fetch
Can you post your server code so that I'm able to reproduce your error?
Here's a simple server that I used to test this:
const express = require('express');
const app = express();
app.use((req, res) => {
res.sendStatus(503);
});
const port = 50051;
app.listen(port, () => {
console.log(`Server is running on http://localhost:${port}`);
});
Its a server that doesnt support HTTP1 with envoy in front of it. It returns upstream connect error or disconnect/reset before headers. reset reason: remote reset
I think you need to run the wasm client from the browser to repro.
have you tested this library much from the browser? I wrote a whole bunch of code that was running fine in the test runner - it was able to connect to my grpc web server and everything was working, then when i bundled it with wasm-pack and started using it in the browser some stuff has broken.
Im going to open another issue for that other stuff
sorry its me not you.
the web dev who wrote the site im integrating into overrode fetch
with his own implementation. i just found it.
Sorry to waste your time.
Hi. I'm calling into my backend server which is throwing a 503 for some reason. It doesnt look like tonic-web-wasm-client handles it super gracefully. I'm getting the error
TypeError: Cannot read properties of undefined (reading 'status')
and I think its coming from hereThe callstack is as follows:
I can see a status code in the network inspector which says 503 so im not super sure how we land here
what do you think?