Skip to content

[CORRUPTED] Synthetic Benchmark PR #30333 - fix(api): surface subscription deletion errors to users#339

Open
ofir-frd wants to merge 13 commits intobase_pr_30333_20260120_1912from
corrupted_pr_30333_20260120_1912
Open

[CORRUPTED] Synthetic Benchmark PR #30333 - fix(api): surface subscription deletion errors to users#339
ofir-frd wants to merge 13 commits intobase_pr_30333_20260120_1912from
corrupted_pr_30333_20260120_1912

Conversation

@ofir-frd
Copy link

Benchmark PR langgenius#30333

Type: Corrupted (contains bugs)

Original PR Title: fix(api): surface subscription deletion errors to users
Original PR Description: ## Summary

This PR fixes a bug where trigger subscription deletion/unsubscribe errors were silently ignored during the rebuild process.

  • Check UnsubscribeResult.success and propagate error messages to users when unsubscribe fails
  • Simplify rebuild logic by removing unnecessary try/except wrapper around unsubscribe
  • Refactor update API to use cleaner conditional logic with any()
  • Remove redundant test cases that validated silent error handling behavior

Fixes langgenius#30332

Test Plan

Compliance Violation

  • Rule: Python Backend Must Use Deterministic Control Flow
  • Language: Python
  • File: api/services/trigger/trigger_provider_service.py
Mairuis and others added 13 commits December 29, 2025 18:01
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
… TriggerSubscriptionUpdateRequest - 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.
…oviderService - Deleted the test for rebuilding trigger subscriptions with unsupported credential types, as it was deemed unnecessary. - This change helps streamline the test suite by focusing on relevant scenarios.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants