diff --git a/src/core/ext/filters/rbac/rbac_service_config_parser.cc b/src/core/ext/filters/rbac/rbac_service_config_parser.cc index f7264b3fe0a..bb9b529e9f7 100644 --- a/src/core/ext/filters/rbac/rbac_service_config_parser.cc +++ b/src/core/ext/filters/rbac/rbac_service_config_parser.cc @@ -203,7 +203,7 @@ struct RbacConfig { ValidationErrors* errors); }; - int action; + int action = static_cast(Rbac::Action::kDeny); std::map policies; // Defaults to kNone since its json field is optional. Rbac::AuditCondition audit_condition = Rbac::AuditCondition::kNone; @@ -801,7 +801,7 @@ void RbacConfig::RbacPolicy::Rules::JsonPostLoad(const Json& json, if (rbac_action != Rbac::Action::kAllow && rbac_action != Rbac::Action::kDeny) { ValidationErrors::ScopedField field(errors, ".action"); - errors->AddError("unknown action"); + errors->AddError(absl::StrCat("unknown action ", rbac_action)); } // Parse and validate audit_condition field. auto condition = LoadJsonObjectField(json.object(), args,