-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Improve error message for invalid consenter cert #2587
Conversation
orderer/consensus/etcdraft/util.go
Outdated
@@ -247,7 +247,7 @@ func VerifyConfigMetadata(metadata *etcdraft.ConfigMetadata, verifyOpts x509.Ver | |||
return errors.Errorf("metadata has nil consenter") | |||
} | |||
if err := validateConsenterTLSCerts(consenter, verifyOpts, true); err != nil { | |||
return err | |||
return errors.Wrapf(err, "consenter %s:%d has invalid certificate", consenter.Host, consenter.Port) |
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.
errors.WithMessagef
would be a better choice, as the underlying error is generated by the fabric code.
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.
done
When channel config had an invalid consenter cert, the error message did not indicate which cert was being verified. The error message now indicates that a consenter cert is invalid, and which consenter cert is invalid. Signed-off-by: David Enyeart <[email protected]>
f0a5b5b
to
583270a
Compare
@Mergifyio backport release-2.3 |
@Mergifyio backport release-2.2 |
When channel config had an invalid consenter cert, the error message did not indicate which cert was being verified. The error message now indicates that a consenter cert is invalid, and which consenter cert is invalid. Signed-off-by: David Enyeart <[email protected]> (cherry picked from commit dbf7eb1)
Command
|
When channel config had an invalid consenter cert, the error message did not indicate which cert was being verified. The error message now indicates that a consenter cert is invalid, and which consenter cert is invalid. Signed-off-by: David Enyeart <[email protected]> (cherry picked from commit dbf7eb1)
Command
|
When channel config had an invalid consenter cert, the error message did not indicate which cert was being verified. The error message now indicates that a consenter cert is invalid, and which consenter cert is invalid. Signed-off-by: David Enyeart <[email protected]> (cherry picked from commit dbf7eb1)
When channel config had an invalid consenter cert, the error message did not indicate which cert was being verified. The error message now indicates that a consenter cert is invalid, and which consenter cert is invalid. Signed-off-by: David Enyeart <[email protected]> (cherry picked from commit dbf7eb1)
When channel config had an invalid consenter cert, the error message did not indicate which cert was being verified. The error message now indicates that a consenter cert is invalid, and which consenter cert is invalid. Signed-off-by: David Enyeart <[email protected]> (cherry picked from commit dbf7eb1)
When channel config had an invalid consenter cert, the error message did not indicate which cert was being verified.
The error message now indicates that a consenter cert is invalid, and which consenter cert is invalid.
Signed-off-by: David Enyeart [email protected]