Webhooks trigger regardless of object save failure #5081

Closed
opened 2025-12-29 19:23:54 +01:00 by adam · 2 comments
Owner

Originally created by @clearly-tyler-whitney on GitHub (Jul 21, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v2.11.9

Python version

3.8

Steps to Reproduce

  1. Create an object permission which leverages one or more constraints and map it to a user (or group).
  2. Create a webhook which triggers on the same objects & actions. Monitor the webhook receiver.
  3. Attempt an operation which violates one or more of the configured constraints.

Expected Behavior

The operation should fail, and the associated webhook should not trigger.

Observed Behavior

The operation fails, but the webhook is still triggered.

Originally created by @clearly-tyler-whitney on GitHub (Jul 21, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v2.11.9 ### Python version 3.8 ### Steps to Reproduce 1. Create an object permission which leverages one or more constraints and map it to a user (or group). 2. Create a webhook which triggers on the same objects & actions. Monitor the webhook receiver. 3. Attempt an operation which violates one or more of the configured constraints. ### Expected Behavior The operation should fail, and the associated webhook should not trigger. ### Observed Behavior The operation fails, but the webhook is still triggered.
adam added the type: bugstatus: accepted labels 2025-12-29 19:23:54 +01:00
adam closed this issue 2025-12-29 19:23:55 +01:00
Author
Owner

@clearly-tyler-whitney commented on GitHub (Aug 18, 2021):

This behavior can also be observed with other failed object manipulations, e.g., in my case, a CSV import of Circuits which passed formatting validations but did not succeed in saving new objects due to a duplicate row.

Per the documentation (emphasis is my own):

A webhook is a mechanism for conveying to some external system a change that took place in NetBox.

This suggests an order-of-operations discrepancy rather than anything to do with object-level permissions in particular. Issue title updated.

@clearly-tyler-whitney commented on GitHub (Aug 18, 2021): This behavior can also be observed with other failed object manipulations, e.g., in my case, a CSV import of Circuits which passed formatting validations but did not succeed in saving new objects due to a duplicate row. Per the documentation (emphasis is my own): > A webhook is a mechanism for conveying to some external system **a change that took place** in NetBox. This suggests an order-of-operations discrepancy rather than anything to do with object-level permissions in particular. Issue title updated.
Author
Owner

@jeremystretch commented on GitHub (Aug 20, 2021):

Tagging #6957 as a related issue

@jeremystretch commented on GitHub (Aug 20, 2021): Tagging #6957 as a related issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5081