Skip to content
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

fix(synthetics): add error handling to multilocation alert condition for invalid GUIDs #2641

Merged
merged 5 commits into from
Apr 25, 2024

Conversation

abasha1234
Copy link
Member

Description

This PR includes changes for error handling when an invalid monitor ID is provided for the resource newrelic_synthetics_multilocation_alert_condition.

Ticket : https://new-relic.atlassian.net/browse/NR-257490

Fixes # (issue)
Issue: #2631

Before the changes, getMonitorID() fails with panic on wrong monitor ID

Screenshot 2024-04-24 at 10 27 06

After the changes, getMonitorID() throwing an error

Screenshot 2024-04-24 at 10 50 25

Checklist:

Please delete options that are not relevant.

  • My commit message follows conventional commits
  • My code is formatted to Go standards
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes. Go here for instructions on running tests locally.

@pranav-new-relic pranav-new-relic changed the title feat: Add error handling for invalid entity fix(synthetics): add error handling to multilocation alert condition for invalid GUIDs Apr 24, 2024
@abasha1234 abasha1234 marked this pull request as ready for review April 24, 2024 07:21
@abasha1234 abasha1234 marked this pull request as draft April 24, 2024 18:50
Copy link
Member

@pranav-new-relic pranav-new-relic left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍 great work on this @abasha1234

@pranav-new-relic pranav-new-relic marked this pull request as ready for review April 25, 2024 10:47
@pranav-new-relic pranav-new-relic merged commit 9497f06 into main Apr 25, 2024
8 of 9 checks passed
@pranav-new-relic pranav-new-relic deleted the NR-257490 branch April 25, 2024 10:47
@abasha1234
Copy link
Member Author

The PR change has been validated with the following cases

invalid monitor_id

Screenshot 2024-04-25 at 16 34 55

monitor_id as empty string

Screenshot 2024-04-25 at 16 35 42

@pranav-new-relic
Copy link
Member

Awesome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants