-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: add better error handlings when common config is missing #566
feat: add better error handlings when common config is missing #566
Conversation
Gives a better error messages when the developer runs with hybrid mode but not including common config. Closes: edgexfoundry#564 Signed-off-by: Jim Wang <[email protected]>
bootstrap/handlers/clients.go
Outdated
@@ -110,6 +110,11 @@ func (cb *ClientsBootstrap) BootstrapHandler( | |||
return false | |||
} | |||
|
|||
if len(config.GetBootstrap().Service.RequestTimeout) == 0 { | |||
lc.Error("Service.RequestTimeout found empty in bootstrap config, missing common config? Use -cp or -cc flags for common config") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lc.Error("Service.RequestTimeout found empty in bootstrap config, missing common config? Use -cp or -cc flags for common config") | |
lc.Error("Service.RequestTimeout found empty in service's configuration, missing common config? Use -cp or -cc flags for common config") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all suggestions updated
Signed-off-by: Jim Wang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Gives a better error messages when the developer runs with hybrid mode but not including common config.
Closes: #564
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/go-mod-bootstrap/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:
BREAKING CHANGE:
describing the break)Testing Instructions
make
first from the base root of device-sdk repo to compile the device-sdk together with the local go-mod-bootstrapcd ./example/cmd/device-simple
make
./device-simple
without any flags like -cc or -d"Service.RequestTime found empty in bootstrap conifg, missing common config? Use -cp or -cc flags for common config"
New Dependency Instructions (If applicable)