-
Notifications
You must be signed in to change notification settings - Fork 692
refactor: do not print out record in error responses #37152
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
Conversation
I think it would be good if for errors that are raised due to lack of permisions, that it's somehow understandable from the error, as these are expected cases (Something like a "Sorry, you don't have permission to do this"). I'd also argue that just the HTTP status code isn't sufficient in these cases since it's also used for other things. |
I think we're talking about different cases here. I updated the cases where we're handling unexpected errors. I hope that the case you described is actually handled as expected, and we don't randomly throw exceptions. The fix here is that we still have (conceptually) a big try catch around engine execution, in case there are any unexpected errors. And before, we were passing back the complete exception message, which may include the complete serialized record. So two things here:
Does that make sense? For missing permissions, I would expect the processors themselves to send an explicit rejection, and not have it handled in the uncaught exception loop. |
Thanks, yes, that makes sense. And I do recall that for permission problems we already had another format and that didn't expose the full record, so that fits your explanation :) |
eaad7b6
to
c183606
Compare
Successfully created backport PR for |
Description
This PR updates the error messages sent as rejection responses back to user when we face a processing error (i.e. an unexpected error).
Previously, there was a good chance that we would leak the complete record as part of it, which is generally something users do not understand and do not know what to do with it.
Note that the original error is still logged, so we have access to it via the logs, but the response is much more lightweight. The "actionable" part of the error is to look at logs or ask your operator to do so, with the command key, partition, value type, and intent.
Related issues
related to #35177
In the sense that this highlighted we just leak the complete record all the way through the client.