Skip to content

Error when channel isn't available #364

@v0idpwn

Description

@v0idpwn

Describe the bug
Trying to use a closed channel with the gun adapter, I get the following error: {:error, %GRPC.RPCError{status: 2, message: ":down: :normal"}}

To Reproduce
Steps to reproduce the behavior:

  • Attempt to use a channel that finished due to a timeout or similar

Expected behavior

  • A more specific error, which would allow me to retry. Currently, I'm matching on the error message ":down: :normal", but I'd like to have a different status or a different error instead of %GRPC.RPCError{}, specially considering that maybe the connection process is down for other reason.

Versions:

  • OS: Linux
  • Erlang: 26.1.2
  • Elixir: 1.15.6-otp-26
  • mix.lock(grpc, gun, cowboy, cowlib):
grpc: v0.8.1
gun: v2.1.0
cowlib: v2.13.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions