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

Add extra error handling for creating vlans #281

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

matt852
Copy link
Contributor

@matt852 matt852 commented Sep 15, 2022

For cases where there is an Exception thrown when trying to retrieve device tags, I added in exception handling to ignore the tags and continue processing the vlan creation.

This resolved the issue when I tested it locally, however it does not necessarily resolve the root cause of the issue, which I believe stems from the device.get_device_tag_id() method further upstream.

@matt852
Copy link
Contributor Author

matt852 commented Sep 15, 2022

Closes issue #280

nb_params["tags"].append(tag_id)
except pynautobot.core.query.RequestError:
# If there is an error with tag retrieval, ignore tags
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we log something? (even for DEBUG)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chadell Good call. I added a warning message

@matt852 matt852 requested a review from chadell December 1, 2022 13:26
Copy link
Contributor

@chadell chadell left a comment

Choose a reason for hiding this comment

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

LGTM

@matt852 matt852 merged commit 9e36624 into networktocode:develop Dec 1, 2022
@matt852 matt852 deleted the 280-workaround branch December 1, 2022 14:12
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.

None yet

2 participants