Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings logged on response code 304 #3972

Closed
mortenbock opened this issue Jul 10, 2023 · 2 comments · Fixed by #3973
Closed

Warnings logged on response code 304 #3972

mortenbock opened this issue Jul 10, 2023 · 2 comments · Fixed by #3973

Comments

@mortenbock
Copy link

Describe the bug
When using the change feed processor, the Cosmos api will often return status 304, to indicate that there are no changes.

This causes an error to be logged with a message about LatencyOverThreshold, which is not actually the case. The response time is below the limit, but the condition also requires that the response code .IsSuccess() which means 200-299.

image

This seems to be the line causing this:

return response.Diagnostics.GetClientElapsedTime() > latencyThreshold || !response.StatusCode.IsSuccess();

Expected behavior
I would expect to only get LatencyOverThreshold warning logged when the latency threshold is exceeded.

If the response has an error code, that should be a different warning/error message, and in this case 304 status is not an error.

@ealsur
Copy link
Member

ealsur commented Jul 10, 2023

@sourabh1007 Could you take a look?

@sourabh1007
Copy link
Contributor

Thanks for pointing it out @mortenbock , fixing it as part of attached PR. it should be available in next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants