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

Handle not exception errors from the server #321

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

avillen
Copy link
Contributor

@avillen avillen commented Jun 14, 2023

Related to #316 (comment)

Comment on lines 379 to 384
{:ok, _stream, error = %GRPC.RPCError{message: nil, status: status}} ->
{:error, %{error | message: GRPC.Status.status_message(status)}}

{:ok, _stream, error = %GRPC.RPCError{}} ->
{:error, error}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe more changes are needed so that we get this errors to bubble up without raising. Currently they still raise on like 364.

The idea is that if we manage to bubble them up, then they'll bypass any exception-handling workflow and they'll also follow all interceptors along instead of cutting the workflow dry after the call

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely I'm wrong, but I'm understanding that those exits are because that part of the code is executed with a spawn_link + Process.flag(:trap_exit, true). I have updated the Server module to return an error tuple that in fact is what I think the logger interceptor expects. I'm missing something no?

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.

2 participants