Skip to content

fix: catch and exit with error when rs initialization fails#79

Merged
marcuspoehls merged 1 commit intosupercharge:mainfrom
corva-ai:fix/mongodb-catch-and-exit-when-errors-initializing-the-rs
Apr 22, 2026
Merged

fix: catch and exit with error when rs initialization fails#79
marcuspoehls merged 1 commit intosupercharge:mainfrom
corva-ai:fix/mongodb-catch-and-exit-when-errors-initializing-the-rs

Conversation

@smoke
Copy link
Copy Markdown
Contributor

@smoke smoke commented Apr 21, 2026

There are cases that mongo may fail to start or fail to initialize, however the error was not resulting in Action error so that Users get feedback e.g.

Initiating replica set [rs0]
  �]0;mongosh mongodb://<credentials>@127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000�MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017
  Success! Initiated replica set [rs0]
Checking replica set status [rs0]
  �]0;mongosh mongodb://<credentials>@127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000�MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017

I've stumbled on that probably because of docker-library/mongo#748

@marcuspoehls marcuspoehls merged commit c3409c8 into supercharge:main Apr 22, 2026
36 checks passed
@marcuspoehls
Copy link
Copy Markdown
Member

@smoke Thank you Radoslav!

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