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
Describe the bug
Each time FetchToggles is called when no feature flags have changed we see a logging that the Json serializer can not parse the empty response.
To Reproduce
Steps to reproduce the behavior:
Configure unleash with appName, projectId, apiKey, url, we use the System.Text.Json.JsonSerializer
Create an Unleashclient with FetchToggleInterval set to i.e. 20 seconds.
Call the client.IsEnabled("any flag", context)
Wait for next fetch interval
See error
Expected behavior
We should see no errors.
Actual behavior
In the logs you see that the error appears:
The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.",
Desktop (please complete the following information):
OS: Windows
Browser chrome
Version 4.1.5 (latest at the moment of writing)
Additional context
After some debugging I see that when the status 304 is received (= NOTMODIFIED) we enter the HandleSuccessResponse() function in the UnleashApiClient.cs file.
There first a check is made if the eTag has changed. If not the response.Content is Deserialized but since it is empty an error is thrown.
This can easily be fixed by extending the condition "if(newEtag == etag)" to:
Describe the bug
Each time FetchToggles is called when no feature flags have changed we see a logging that the Json serializer can not parse the empty response.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
We should see no errors.
Actual behavior
In the logs you see that the error appears:
The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.",
Desktop (please complete the following information):
Additional context
After some debugging I see that when the status 304 is received (= NOTMODIFIED) we enter the HandleSuccessResponse() function in the UnleashApiClient.cs file.
There first a check is made if the eTag has changed. If not the response.Content is Deserialized but since it is empty an error is thrown.
This can easily be fixed by extending the condition "if(newEtag == etag)" to:
So in the case the status = NOTMODIFIED we directly return that there were no changes.
Can this bugfix taken up a.s.a.p.?
The text was updated successfully, but these errors were encountered: