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

Close stream when there's an error from target #347

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

sfc-gh-elinardi
Copy link
Collaborator

Currently when proxy receives an error from a target, it might return a policy evaluation cancelled error instead the actual error from the target.

Policy evaluation cancelled error looks like:

"error":"authz policy evaluation error: eval_cancel_error: caller cancelled query execution"

This is because proxy doesn't immediately close the stream and return the error. It might still be proceeding with executing policy evaluation, which then gets cancelled.
As a result, proxy returns a policy evaluation cancelled error to the client, not the actual error.

Solution

Close stream immediately when receiving error from a target.

@sfc-gh-elinardi sfc-gh-elinardi merged commit d8ccc81 into main Oct 11, 2023
4 checks passed
@sfc-gh-elinardi sfc-gh-elinardi deleted the elinardi-proxy-close-err branch October 11, 2023 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants