Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,14 @@ void Aggregated::Check(
if (status.ok()) {
Status status = Proto::ConvertCheckResponse(
*response, service_control_proto_.service_name(), &response_info);
// If allow_unregistered_calls is true, it is always OK to proceed.
if (allow_unregistered_calls) {
// If server replied with either invalid api_key or not actived service,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

activated

// the request is failed even allow_unregistered_calls is true. Most

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/failed/rejected/

// likely, users provide a wrong api key. By failing the request, the
// users will be notified with the error and have chance to correct it.
// Otherwise, the Report call will fail. It is very hard to notice and
// debug the Report failure.
if (allow_unregistered_calls && response_info.is_api_key_valid &&
response_info.service_is_activated) {
on_done(Status::OK, response_info);
} else {
on_done(status, response_info);
Expand Down