-
Notifications
You must be signed in to change notification settings - Fork 213
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
Make error message for certs not found in user table clearer #530
Conversation
src/node/rpc/frontend.h
Outdated
@@ -503,7 +503,7 @@ namespace ccf | |||
jsonrpc::error_response( | |||
0, | |||
jsonrpc::CCFErrorCodes::INVALID_CALLER_ID, | |||
"No corresponding caller entry exists."), | |||
"Could not find matching user certificate."), |
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.
This is also called by members, where this error is incorrect. We could use callers->get_name()
, but I think that will be ccf.user_certs
?
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.
actor certificate?
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.
Maybe overkill, but as a general solution:
frontend.h
:
virtual std::string invalid_caller_error_message() const {
return "Could not find matching actor certificate";
}
memberfrontend.h
:
std::string invalid_caller_error_message() const override {
return "Could not find matching member certificate";
}
etc
Codecov Report
@@ Coverage Diff @@
## master #530 +/- ##
==========================================
+ Coverage 78.12% 78.12% +<.01%
==========================================
Files 140 140
Lines 10473 10475 +2
==========================================
+ Hits 8181 8183 +2
Misses 2292 2292
|
fix #525