Closed chriswk closed 2 years ago
I'll add a couple of tests verifying this behaviour.
I'm wondering if we should add more logic when we receive a 401 and just stop the poll; but that can be a different improvement.
Jeah, I guess the user can also call stop themselves in that scenario if they like. A 401 could be temporary (e.g. incorrectly sending traffic to a different server)
how can I omit those errors ? my console log is being spammed by the same error (my feature flag is working fine)
Hi everyone, just like @fivaz it shows me the same error. Your support please on how to bypass it, my feature flag works fine.
I think you introduced this issue: https://github.com/Unleash/unleash-proxy-client-js/issues/111
I think you are missing 304 in your test its reporting as an error when its an OK.
I think this line...
if (response.ok && response.status !== 304) {
needs to be
if (response.ok || response.status === 304) {
This now checks if response is not ok, if it is not, we emit an error object with a type and a statusCode.
I'm wondering if we should add more logic when we receive a 401 and just stop the poll; but that can be a different improvement. fixes #108