- Introduced a model validator in TriggerSubscriptionUpdateRequest to enforce that at least one of the fields (name, credentials, parameters, properties) must be provided.
- Refactored the TriggerSubscriptionUpdateApi to use the validated request object and simplified the logic for updating subscriptions based on the credential type.
- Updated the credential type check in TriggerProviderService to use a set for better performance and clarity.
Previously, when rebuilding a trigger subscription, errors from the
unsubscribe operation were silently caught and logged without
propagating to the user. This left users unaware of failures during
subscription management.
Changes:
- Check UnsubscribeResult.success and raise ValueError with the error
message when unsubscribe fails
- Simplify the rebuild logic by removing unnecessary try/except wrapper
- Refactor update API to use cleaner conditional logic
- Remove redundant test cases that tested silent error handling