-
Notifications
You must be signed in to change notification settings - Fork 44
feat: extend ServerError
with helpful data
#160
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
9dd1c6b
to
a5a3fbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't initially clear why the fields were separated, I've left some clarifications that I think might help?
payload: Option<ServerErrorPayload>, | ||
|
||
/// Flags if the error was generated by the client to simulate some server behavior or workaround a bug. | ||
is_virtual: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the intended use-case for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debugging mostly
protocol_error: ProtocolError, | ||
|
||
/// Server message provided by the broker, if any. | ||
error_message: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this could be merged into ServerErrorResponse
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think most newer Kafka messages now have an error code and a human-readable string (i.e. this message). The response is mostly what else we could extract. So yeah, we could merge it but I guess the resulting enum will rather unhelpful because in many cases we don't have anything else than the error message.
@tustvold PTAL |
On top of #159.Closes #148.