Skip to content

fix: Return a GRPC.RPCError in mint adapter#545

Merged
polvalente merged 2 commits into
elixir-grpc:masterfrom
rockneurotiko:mint_error_format
Jun 18, 2026
Merged

fix: Return a GRPC.RPCError in mint adapter#545
polvalente merged 2 commits into
elixir-grpc:masterfrom
rockneurotiko:mint_error_format

Conversation

@rockneurotiko

Copy link
Copy Markdown
Contributor

Fixes #544

Gun adapter always returns {:error, %GRPC.RPCError{}} when an error happen while reading data, Mint on the other hand returns {:error, String.t()}, this PR changes the mint adapter to return {:error, %GRPC.RPCError{}} just like the gun adapter

@rockneurotiko

rockneurotiko commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

For the tests (the reason the CI fails), I had to uncomment this locally on the grpc mix.exs to be able to run them:

      {:grpc_server, path: "../grpc_server", only: :test}

Do you want me to uncomment it (or point to ~> 1.0)

@polvalente

Copy link
Copy Markdown
Contributor

@sleipnir for what it's worth, I think we should consider this a bug and release the fix in 1.0.1

@sleipnir

Copy link
Copy Markdown
Collaborator

@sleipnir for what it's worth, I think we should consider this a bug and release the fix in 1.0.1

I agree

@sleipnir

Copy link
Copy Markdown
Collaborator

For the tests (the reason the CI fails), I had to uncomment this locally on the grpc mix.exs to be able to run them:

      {:grpc_server, path: "../grpc_server", only: :test}

Do you want me to uncomment it (or point to ~> 1.0)

Please uncomment

@rockneurotiko

Copy link
Copy Markdown
Contributor Author

For the tests (the reason the CI fails), I had to uncomment this locally on the grpc mix.exs to be able to run them:

      {:grpc_server, path: "../grpc_server", only: :test}

Do you want me to uncomment it (or point to ~> 1.0)

Please uncomment

Done! Doing the deps get also updated the lock, it still had the grpc_core-rc.1

@polvalente polvalente merged commit 38b4aaa into elixir-grpc:master Jun 18, 2026
7 checks passed
@rockneurotiko rockneurotiko deleted the mint_error_format branch June 18, 2026 06:53
@sleipnir

Copy link
Copy Markdown
Collaborator

Tks @rockneurotiko we will release new version on Hex

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.

GRPC Client Mint adapter returns error string instead of %GRPC.RPCError{}

3 participants