[ https://issues.apache.org/jira/browse/KAFKA-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14640654#comment-14640654 ]
Gwen Shapira commented on KAFKA-2100: ------------------------------------- Regarding how often it happens: I believe its mostly an upgrade concern (i.e. we added new error codes to the server, but didn't upgrade the client so it can't translate them properly). However, its just very frustrating to troubleshoot because you see the UNKNOWN and simply have no clue as to what went wrong. I like option #2 since its short, simple and solves what I see as the main issue with UNKNOWN (that you have no clues at all). I agree that option #1 could impact client logic (although UNKNOWN is not retriable). I didn't dig deep into the code yet, but do you think it makes sense to keep the UNKNOWN code in the Error class, and just add the code to the message in the Exception? Will this get to the error log eventually? Since option #1 can have other implications on client-side, it will be awesome if others take a look too: [~guozhang], [~jkreps], [~ewencp], [~junrao]? Regarding the inconsistent ways errors are handled, can you point out few examples? > Client Error doesn't preserve or display original server error code when it > is an unknown code > ---------------------------------------------------------------------------------------------- > > Key: KAFKA-2100 > URL: https://issues.apache.org/jira/browse/KAFKA-2100 > Project: Kafka > Issue Type: Bug > Components: clients > Reporter: Gwen Shapira > Assignee: David Jacot > Labels: newbie > Attachments: KAFKA-2100-1.patch > > > When the java client receives an unfamiliar error code, it translates it into > UNKNOWN(-1, new UnknownServerException("The server experienced an unexpected > error when processing the request")) > This completely loses the original code, which makes troubleshooting from the > client impossible. > Will be better to preserve the original code and write it to the log when > logging the error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)