René's URL Explorer Experiment


Title: Add `FailureDetails.is_caused_by()` to mirror .NET's `TaskFailureDetails.IsCausedBy()` · Issue #162 · microsoft/durabletask-python · GitHub

Open Graph Title: Add `FailureDetails.is_caused_by()` to mirror .NET's `TaskFailureDetails.IsCausedBy()` · Issue #162 · microsoft/durabletask-python

X Title: Add `FailureDetails.is_caused_by()` to mirror .NET's `TaskFailureDetails.IsCausedBy()` · Issue #162 · microsoft/durabletask-python

Description: Summary The .NET SDK exposes TaskFailureDetails.IsCausedBy() / IsCausedBy(Type), which lets a caller introspect an orchestration/activity failure and ask "was this caused by exception type T?" (with base-type support). The Python Fail...

Open Graph Description: Summary The .NET SDK exposes TaskFailureDetails.IsCausedBy() / IsCausedBy(Type), which lets a caller introspect an orchestration/activity failure and ask "was this caused by exception type T?" (...

X Description: Summary The .NET SDK exposes TaskFailureDetails.IsCausedBy<T>() / IsCausedBy(Type), which lets a caller introspect an orchestration/activity failure and ask "was this caused by exception...

Opengraph URL: https://github.com/microsoft/durabletask-python/issues/162

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add `FailureDetails.is_caused_by()` to mirror .NET's `TaskFailureDetails.IsCausedBy\u003cT>()`","articleBody":"## Summary\n\nThe .NET SDK exposes [`TaskFailureDetails.IsCausedBy\u003cT>()` / `IsCausedBy(Type)`](https://github.com/microsoft/durabletask-dotnet/blob/main/src/Abstractions/TaskFailureDetails.cs), which lets a caller introspect an orchestration/activity failure and ask \"was this caused by exception type `T`?\" (with base-type support). The Python `FailureDetails` (`durabletask/task.py`) exposes `message`, `error_type`, and `stack_trace`, but has **no equivalent introspection helper** — callers must compare `failure_details.error_type` against a type name string by hand.\n\nThis is a general-purpose gap in the Python SDK's failure-introspection surface, not specific to any one feature.\n\n## Background / motivation\n\nThis came up during the scheduled-tasks PR (#160). The schedule client surfaces entity-side failures (e.g. an invalid state transition) as a generic `RuntimeError` carrying the failure message — which matches the current .NET ScheduledTasks client behavior (it throws a generic `InvalidOperationException` with `FailureDetails.ErrorMessage`). A more Pythonic API would let callers do something like:\n\n```python\ntry:\n    schedule_client.pause()\nexcept OrchestrationError as e:\n    if e.failure_details.is_caused_by(ScheduleInvalidTransitionError):\n        ...\n```\n\nBut the building block for that — failure-type introspection — doesn't exist yet. Rather than special-case it in the scheduled-tasks client, the framework primitive should land first.\n\n## Proposed API\n\nAdd to `durabletask.task.FailureDetails`:\n\n```python\ndef is_caused_by(self, error_type: str | type) -> bool:\n    \"\"\"Return True if this failure's error_type matches `error_type`.\n\n    Accepts either an exception type or its (qualified or unqualified) name.\n    \"\"\"\n```\n\nDesign notes / open questions:\n- .NET matches by attempting to **load** the type named in `ErrorType` and checking assignability (base-type aware). Python could do something analogous (import the type and use `issubclass`), or a simpler/safer name-based match. Worth deciding how much \"load arbitrary type by name\" behavior we want, given the security posture of the rest of the SDK.\n- Python's `error_type` is the bare class name (e.g. `ScheduleInvalidTransitionError`), not namespace-qualified like .NET, so a name-based comparison is straightforward but won't disambiguate same-named types from different modules.\n- Should this also consider `InnerFailure`/chained causes once nested failure details are exposed?\n\n## Related\n\n- PR #160 (scheduled tasks) — discussion thread on flattening typed schedule exceptions to `RuntimeError`.\n- .NET reference: `src/Abstractions/TaskFailureDetails.cs`.\n\n## Out of scope\n\nReconstructing fully-typed exceptions (e.g. re-raising `ScheduleInvalidTransitionError` with its structured fields) is a separate, larger concern — the structured fields don't survive the orchestration boundary today (only the formatted message does), so that would need an additional `from_failure(message)`-style constructor convention. This issue is only about the `is_caused_by` introspection primitive.","author":{"url":"https://github.com/andystaples","@type":"Person","name":"andystaples"},"datePublished":"2026-06-29T19:12:18Z","url":"https://github.com/microsoft/durabletask-python/issues/162"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1d5acdaa-75ad-4f08-abb3-fdf7d3ef7d53
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDFB2:36B5:5D6EC4:7DD39A:6AFE4CB2
html-safe-nonce86ae964e6ff3fb152c700924dae26fdc829aa96c6f68a1c5183ab4d43e0475f3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkIyOjM2QjU6NUQ2RUM0OjdERDM5QTo2QUZFNENCMiIsInZpc2l0b3JfaWQiOiI1MjY5NzM5OTE5ODEwMzgzMDI2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac234ea3ecac7b6d091c3b50cb3098bf5fdb85a3a3aac56b2725a89417e86ae9de
hovercard-subject-tagissue:4770899720
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/durabletask-python/162/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9a096072226e54463375244f628455cec0cb39a73538ab6d9a47a8102ee20aeb/microsoft/durabletask-python/issues/162
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9a096072226e54463375244f628455cec0cb39a73538ab6d9a47a8102ee20aeb/microsoft/durabletask-python/issues/162
og:image:altSummary The .NET SDK exposes TaskFailureDetails.IsCausedBy() / IsCausedBy(Type), which lets a caller introspect an orchestration/activity failure and ask "was this caused by exception type T?" (...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameandystaples
hostnamegithub.com
expected-hostnamegithub.com
None894d3c8b932306ed8425e8dcbe0c1089667e487c5fe7b8a05d17e7b685207429
turbo-cache-controlno-preview
go-importgithub.com/microsoft/durabletask-python git https://github.com/microsoft/durabletask-python.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id627664515
octolytics-dimension-repository_nwomicrosoft/durabletask-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627664515
octolytics-dimension-repository_network_root_nwomicrosoft/durabletask-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44570ad53e12be09be8000af683c29166c4007cb
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/durabletask-python/issues/162#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-python%2Fissues%2F162
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-python%2Fissues%2F162
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2Fdurabletask-python
Reloadhttps://github.com/microsoft/durabletask-python/issues/162
Reloadhttps://github.com/microsoft/durabletask-python/issues/162
Reloadhttps://github.com/microsoft/durabletask-python/issues/162
microsofthttps://github.com/microsoft
durabletask-pythonhttps://github.com/microsoft/durabletask-python
Codehttps://github.com/microsoft/durabletask-python
Issues15 (15)https://github.com/microsoft/durabletask-python/issues
Pull requests12 (12)https://github.com/microsoft/durabletask-python/pulls
Actionshttps://github.com/microsoft/durabletask-python/actions
Projectshttps://github.com/microsoft/durabletask-python/projects
Security and qualityhttps://github.com/microsoft/durabletask-python/security
Insightshttps://github.com/microsoft/durabletask-python/insights
https://github.com/microsoft/durabletask-python
New issuehttps://github.com/login?return_to=https://github.com/microsoft/durabletask-python/issues/162
New issuehttps://github.com/login?return_to=https://github.com/microsoft/durabletask-python/issues/162
#194https://github.com/microsoft/durabletask-python/pull/194
Add FailureDetails.is_caused_by() to mirror .NET's TaskFailureDetails.IsCausedBy()https://github.com/microsoft/durabletask-python/issues/162#top
#194https://github.com/microsoft/durabletask-python/pull/194
https://github.com/andystaples
andystapleshttps://github.com/andystaples
on Jun 29, 2026https://github.com/microsoft/durabletask-python/issues/162#issue-4770899720
TaskFailureDetails.IsCausedBy() / IsCausedBy(Type)https://github.com/microsoft/durabletask-dotnet/blob/main/src/Abstractions/TaskFailureDetails.cs
#160https://github.com/microsoft/durabletask-python/pull/160
Add scheduled tasks feature and delayed entity signals #160https://github.com/microsoft/durabletask-python/pull/160
Bernd Verst (berndverst)https://github.com/berndverst
on Jul 27, 2026https://github.com/microsoft/durabletask-python/issues/162#event-28519038041
Add FailureDetails.is_caused_by() and fully-qualified error types (#194)https://github.com/microsoft/durabletask-python/commit/4d87430241918969994dffb961674f41dc6b78d5
#194https://github.com/microsoft/durabletask-python/pull/194
https://docs.github.com/articles/closing-issues-via-commit-messages
4d87430https://github.com/microsoft/durabletask-python/commit/4d87430241918969994dffb961674f41dc6b78d5
Bernd Verst (berndverst)https://github.com/berndverst
completedhttps://github.com/microsoft/durabletask-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#194https://github.com/microsoft/durabletask-python/pull/194
on Jul 27, 2026https://github.com/microsoft/durabletask-python/issues/162#event-28519038082
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/durabletask-python/issues/162
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/durabletask-python/issues/162
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.