Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not print stack trace when invalid configuration is encountered #2578

Merged
merged 1 commit into from Jul 1, 2020

Conversation

pgermishuys
Copy link
Contributor

@pgermishuys pgermishuys commented Jun 30, 2020

Changed: Do not print stack traces when an invalid configuration is encountered.

  • This improves invalid configuration output and makes it easier to spot what the actual issue is.
  • This also ensures that an invalid configuration is seen as a graceful shutdown rather than the server terminating unexpectedly.

Before:

[ 7648, 1,19:48:22.633,FTL] Host terminated unexpectedly.
EventStore.Common.Exceptions.InvalidConfigurationException: A TLS Certificate is required unless development mode (--dev) is set.
   at EventStore.ClusterNode.ClusterVNodeHostedService.BuildNode(ClusterNodeOptions options) in C:\source\EventStore\src\EventStore.ClusterNode\ClusterVNodeHostedService.cs:line 380
   at EventStore.ClusterNode.ClusterVNodeHostedService.Create(ClusterNodeOptions opts) in C:\source\EventStore\src\EventStore.ClusterNode\ClusterVNodeHostedService.cs:line 174
   at EventStore.Core.EventStoreHostedService`1..ctor(String[] args) in C:\source\EventStore\src\EventStore.Core\EventStoreHostedService.cs:line 43
   at EventStore.ClusterNode.ClusterVNodeHostedService..ctor(String[] args) in C:\source\EventStore\src\EventStore.ClusterNode\ClusterVNodeHostedService.cs:line 34
   at EventStore.ClusterNode.Program.Main(String[] args) in C:\source\EventStore\src\EventStore.ClusterNode\Program.cs:line 20

After:

[ 5436, 1,19:48:48.398,INF] Quorum size set to 1
[ 5436, 1,19:48:48.402,ERR] Invalid Configuration Encountered
[ 5436, 1,19:48:48.402,ERR] A TLS Certificate is required unless development mode (--dev) is set.

- This improves invalid configuration output and makes it easier to spot
what the actual issue is.
- This also ensures that an invalid configuration is seen as a graceful
shutdown rather than the server terminating unexpectedly.
@hayley-jean hayley-jean merged commit bc006a2 into master Jul 1, 2020
@hayley-jean hayley-jean deleted the invalid-conf-stack-trace branch July 1, 2020 07:51
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.

None yet

3 participants