fix(api): update TriggerInvokeEventResponse to use Field for default value of cancelled

This commit is contained in:
Harry 2025-11-04 18:12:52 +08:00
parent 49edd58722
commit 6e76f2aff2
2 changed files with 4 additions and 2 deletions

View File

@ -246,7 +246,7 @@ class RequestFetchAppInfo(BaseModel):
class TriggerInvokeEventResponse(BaseModel):
variables: Mapping[str, Any] = Field(default_factory=dict)
cancelled: bool | None = False
cancelled: bool = Field(default=False)
model_config = ConfigDict(protected_namespaces=(), arbitrary_types_allowed=True)

View File

@ -191,7 +191,9 @@ class TriggerManager:
)
except EventIgnoreError:
return TriggerInvokeEventResponse(variables={}, cancelled=True)
except Exception as e:
raise e
@classmethod
def subscribe_trigger(
cls,