Skip to content

Prevent exception when pool is not started, return error tuple instead#30

Merged
guisehn merged 2 commits into
mainfrom
do-not-crash-when-pool-not-started
Mar 17, 2026
Merged

Prevent exception when pool is not started, return error tuple instead#30
guisehn merged 2 commits into
mainfrom
do-not-crash-when-pool-not-started

Conversation

@guisehn

@guisehn guisehn commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

If the pool process is not started, prevent the exception when calling Pool.get_channel():

** (ArgumentError) unknown registry: MyApplication.Pool.Registry
    (elixir 1.18.1) lib/registry.ex:1457: Registry.key_info!/1
    (elixir 1.18.1) lib/registry.ex:590: Registry.lookup/2
    (conn_grpc 0.2.1) lib/conn_grpc/pool.ex:132: ConnGRPC.Pool.get_channel/1
    iex:1: (file)

Instead, return {:error, :not_started}

@guisehn guisehn changed the title Prevent crash when pool is not started Prevent exception when pool is not started, return error tuple instead Mar 17, 2026

@orca-security-us orca-security-us Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed OSS Licenses high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@guisehn
guisehn merged commit 946f441 into main Mar 17, 2026
21 checks passed
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