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

DRILL-4586: Add ErrorType#CLIENT to UserException for client side errors #567

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sudheeshkatkam
Copy link
Contributor

  • Resolve relevant TODOs

@parthchandra please review.

@parthchandra
Copy link
Contributor

Per my understanding User Exception was meant for errors on the server side that are to bet sent back to the user. Are you extending that definition?

@jacques-n
Copy link
Contributor

This also breaks client/wire compatibility. In previous discussions, we said that we would avoid breaking compatibility. If you proceed with this, you'll need to add a compatibility layer in the server that understands the different client versions and whether a server can return this value on the wire.

@sudheeshkatkam
Copy link
Contributor Author

sudheeshkatkam commented Aug 31, 2016

Per Hakim's comment, SYSTEM type is meant for unexpected errors that do not have a "nice" error message yet. However in some error cases on the client side, there can be nice error messages, as shown in these changes.

Regarding compatibility: the server should not produce CLIENT type user exceptions, so old clients can talk to new servers; mentioned in the CLIENT type description as some error on the client side.

@jacques-n
Copy link
Contributor

It seems error-prone/dangerous to change the wire protocol for something that will never be sent on the wire.

@sudheeshkatkam
Copy link
Contributor Author

For now, I am not sure how else to fix this; will punt until compatibility later is introduced.

@jacques-n
Copy link
Contributor

Since it is all on the client/in the same jvm, why not just throw an exception and catch it? No need to jump through all the hoops that UserException goes through since you're never trying to propagate between multiple nodes.

@sudheeshkatkam
Copy link
Contributor Author

I am confused here. The patch enhances the catch clauses of thrown exceptions and, in a way, "corrects" what was being reported to the user as a SYSTEM (server) error to CLIENT error since these exceptions happened on the client side (abd eventually a UserException needs to be reported).

I tried to extend UserException to ClientException, but no contextual information can be added because of how the UserException.Builder is setup. I will punt this.

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.

None yet

3 participants