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

Add code and message to base.NoSuchMethodError #3044

Merged

Conversation

nathanielmanistaatgoogle
Copy link
Member

This is part of support for applications being able to respond to RPCs
with unrecognized names with specific codes and messages.

@soltanmm
Copy link
Contributor

Needs a rebase.

This is part of support for applications being able to respond to RPCs
with unrecognized names with specific codes and messages.
@nathanielmanistaatgoogle nathanielmanistaatgoogle force-pushed the no-such-method-code-and-message branch from ef840d3 to 815604f Compare August 25, 2015 05:06
@nathanielmanistaatgoogle
Copy link
Member Author

Rebased as needed.

@soltanmm
Copy link
Contributor

Any particular reason only NoSuchMethodError is getting this treatment? I'd have thought other errors also have status codes/details as well.

Is the status in this case the low-level status of gRPC core or something entirely different? In either case, mind documenting the types involved?

@nathanielmanistaatgoogle
Copy link
Member Author

NoSuchMethodError is getting treated alone in this commit because it stands apart from the other exceptions for the way it is raised by applications rather than by RPC Framework itself. The other exceptions will probably get initial_metadata, terminal_metadata, code, and details attributes in another commit sometime tomorrow.

The code in this case is "whatever the application passes to the NoSuchMethodError constructor", but yes, in practice, "the application" will be a gRPC-specific object that will pass a gRPC status code as the code value.

I would love to document the types involved but they're entirely parametric and Python doesn't really like that. What I wouldn't give for first-class documentation support for type parameters...

soltanmm added a commit that referenced this pull request Aug 26, 2015
…-code-and-message

Add code and message to base.NoSuchMethodError
@soltanmm soltanmm merged commit f61897d into grpc:master Aug 26, 2015
@nathanielmanistaatgoogle nathanielmanistaatgoogle deleted the no-such-method-code-and-message branch August 28, 2015 15:53
@lock lock bot locked as resolved and limited conversation to collaborators Jan 30, 2019
@lock lock bot unassigned soltanmm Jan 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants