Skip to content

fix(agent): warn instead of error the policy removal error when polic…#2986

Open
lpegoraro wants to merge 5 commits intoorb-community:developfrom
lpegoraro:fix/agent
Open

fix(agent): warn instead of error the policy removal error when polic…#2986
lpegoraro wants to merge 5 commits intoorb-community:developfrom
lpegoraro:fix/agent

Conversation

@lpegoraro
Copy link
Contributor

…y was not found.

@lpegoraro lpegoraro self-assigned this Feb 1, 2024
@github-actions github-actions bot added the golang label Feb 1, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 1, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (4c0e2de) 48.60% compared to head (e98140b) 3.18%.

Files Patch % Lines
agent/comms.go 0.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #2986       +/-   ##
===========================================
- Coverage    48.60%   3.18%   -45.42%     
===========================================
  Files           85      15       -70     
  Lines         6372    1068     -5304     
===========================================
- Hits          3097      34     -3063     
+ Misses        3275    1034     -2241     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

if err != nil {
if err := p.request(fmt.Sprintf("policies/%s", name), &resp, http.MethodDelete, http.NoBody, "application/json", RemovePolicyTimeout); err != nil {
if strings.Contains(err.Error(), "404") {
p.logger.Warn("ignoring error from removing a policy not found", zap.String("policy_id", data.ID), zap.String("policy_name", name))
Copy link
Member

Choose a reason for hiding this comment

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

Can we change warning message to policy not found?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments