You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Duplicated email delivery when one of the configurations fails.
Consider setup:
User has multiple configurations: two SMTP and two Sendgrid. It's not uncommon to have separate configurations for different channels
Saleor sends event webhook
One of the configurations time outs or was misconfigured
Currently:
all configurations share the same webhook endpoint, for example /api/webhooks/order-created
some of the configurations will send an email successfully
one of the configurations will throw an error, resulting in non 200 response to the Saleor
webhook will retry, causing duplicated email deliveries
Solution:
each configuration should have a dedicated endpoint for each event: /api/webhooks/$PROVIDER/$CONFIGURATION_ID/order-created
webhooks are dynamically created/removed when the configuration is: created, removed, activated, event is enabled/disabled
now, failure of the single configuration will have no impact on others
Additional pros of the proposed solution:
we'll be able to modify the payload for every configuration in the future (add/remove keys)
less data fetching for each of the webhooks (fetch dedicated configuration instead of all the providers)
less complicated code for webhook management - no need to check all the configurations from all providers to determine if webhook would be removed or not
The content you are editing has changed. Please copy your edits and refresh the page.
The problem I would like to address:
Duplicated email delivery when one of the configurations fails.
Consider setup:
Currently:
/api/webhooks/order-created
Solution:
/api/webhooks/$PROVIDER/$CONFIGURATION_ID/order-created
Additional pros of the proposed solution:
Tasks
The text was updated successfully, but these errors were encountered: