Skip to content

Improve error message#336

Merged
ChrisBr merged 1 commit intomainfrom
cbruckmayer/improve-error-message
Jun 11, 2025
Merged

Improve error message#336
ChrisBr merged 1 commit intomainfrom
cbruckmayer/improve-error-message

Conversation

@ChrisBr
Copy link
Contributor

@ChrisBr ChrisBr commented Jun 9, 2025

I've found that this error message is often confusing for developers which fail to detect that their change causes the application to crash (and hence no leader gets elected).

@ChrisBr ChrisBr force-pushed the cbruckmayer/improve-error-message branch from 5b7a48b to a073283 Compare June 9, 2025 15:15
@ChrisBr ChrisBr force-pushed the cbruckmayer/improve-error-message branch from a073283 to 6ab6c01 Compare June 10, 2025 11:05
unless supervisor.wait_for_workers { display_warnings(supervisor.build) }
unless supervisor.queue_initialized?
abort! "No master was elected. Did all workers crash?", 40
abort! "No leader was elected. This typically means no worker was able to start (e.g. application failed to initialize).", 40

Choose a reason for hiding this comment

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

Is there something we could add to direct developers where to look? Something like were there any errors on application boot?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What about

No leader was elected. This typically means no worker was able to start. Were there any errors during application boot?

?

Choose a reason for hiding this comment

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

Yep that works 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

I think ^ makes sense, only thought it maybe we include that the errors would be in the test jobs

No leader was elected. This typically means no worker was able to start. Check the test job logs for errors on application boot.

@ChrisBr ChrisBr force-pushed the cbruckmayer/improve-error-message branch from 6ab6c01 to d25df63 Compare June 11, 2025 16:21
@ChrisBr ChrisBr merged commit a9277df into main Jun 11, 2025
13 of 23 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.

4 participants