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

fix(dgw): error code on service startup failure #816

Merged
merged 1 commit into from
Apr 18, 2024
Merged

fix(dgw): error code on service startup failure #816

merged 1 commit into from
Apr 18, 2024

Conversation

CBenoit
Copy link
Member

@CBenoit CBenoit commented Apr 18, 2024

Instead of panicking when failing to start the service, we instead attempt to log the error to the log file and return an error code.

Issue: DGW-174

@CBenoit CBenoit requested a review from thenextman April 18, 2024 03:08
Instead of panicking when failing to start the service, we instead
attempt to log the error to the log file and return an error code.

Issue: DGW-174
Comment on lines +128 to +129
const BAD_CONFIG_ERR_CODE: u32 = 1;
const START_FAILED_ERR_CODE: u32 = 2;
Copy link
Member Author

@CBenoit CBenoit Apr 18, 2024

Choose a reason for hiding this comment

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

These are the two status code we now return when failing on startup. When the config is invalid, the logger is never initialized, so we can’t log the exact error, but we know roughly were to look. It’s also possible to run the executable manually in the terminal to get the detailed error. For the other error, the logger will typically be ready (except if the error is us being unable to setup the logger).

@CBenoit CBenoit enabled auto-merge (squash) April 18, 2024 03:12
Copy link
Member

@thenextman thenextman left a comment

Choose a reason for hiding this comment

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

Thanks!

@CBenoit CBenoit merged commit 66e7ce2 into master Apr 18, 2024
20 checks passed
@CBenoit CBenoit deleted the DGW-174 branch April 18, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants