René's URL Explorer Experiment


Title: Framework wraps pydantic.ValidationError as INTERNAL_ERROR; should be INVALID_REQUEST · Issue #652 · adcontextprotocol/adcp-client-python · GitHub

Open Graph Title: Framework wraps pydantic.ValidationError as INTERNAL_ERROR; should be INVALID_REQUEST · Issue #652 · adcontextprotocol/adcp-client-python

X Title: Framework wraps pydantic.ValidationError as INTERNAL_ERROR; should be INVALID_REQUEST · Issue #652 · adcontextprotocol/adcp-client-python

Description: Summary adcp.decisioning.dispatch._invoke_platform_method wraps any uncaught exception from a platform delegate as INTERNAL_ERROR with recovery="terminal". For genuine internals (database failures, NoneType bugs, etc.) that's correct. Bu...

Open Graph Description: Summary adcp.decisioning.dispatch._invoke_platform_method wraps any uncaught exception from a platform delegate as INTERNAL_ERROR with recovery="terminal". For genuine internals (database failures,...

X Description: Summary adcp.decisioning.dispatch._invoke_platform_method wraps any uncaught exception from a platform delegate as INTERNAL_ERROR with recovery="terminal". For genuine internals (database...

Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/652

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Framework wraps pydantic.ValidationError as INTERNAL_ERROR; should be INVALID_REQUEST","articleBody":"## Summary\n\n`adcp.decisioning.dispatch._invoke_platform_method` wraps any uncaught exception from a platform delegate as `INTERNAL_ERROR` with `recovery=\"terminal\"`. For genuine internals (database failures, NoneType bugs, etc.) that's correct.\n\nBut it also catches `pydantic.ValidationError`, which is **request-validation failure** — semantically `INVALID_REQUEST` with `recovery=\"correctable\"`. The current shape is technically wrong (terminal vs correctable, internal vs request) and the wire envelope on A2A specifically degrades to a generic `\"Task failed\"` message that strips the field information a buyer needs to fix the request.\n\n## Repro\n\nA buyer sends an update_media_buy patch with a field shape that fails the platform's stricter request schema (e.g., the platform extends the library type with `extra=\"forbid\"` and the buyer includes an extra field, or a type mismatch in a nested object). The delegate calls `RequestModel.model_validate(patch)`, Pydantic raises `ValidationError`, no caller catches it.\n\nWire result on A2A: `\"Task failed\"` (no `adcp_error.code`, no `field`, no recovery hint).\nWire result on MCP: `INTERNAL_ERROR: \"Platform method 'update_media_buy' raised ValidationError\"` (terminal recovery — wrong; buyer can correct the payload).\n\n## Proposed framework behavior\n\nIn `_invoke_platform_method` (or wherever the catch-all wrapping lives), distinguish `pydantic.ValidationError` from generic `Exception`:\n\n```python\nexcept pydantic.ValidationError as exc:\n    raise AdcpError(\n        code=\"INVALID_REQUEST\",\n        message=_first_error_message(exc),\n        recovery=\"correctable\",\n        field=_first_error_loc_as_dotted_path(exc),\n        details={\"validation_errors\": exc.errors(include_url=False)},\n    )\nexcept Exception as exc:\n    raise AdcpError(code=\"INTERNAL_ERROR\", ..., recovery=\"terminal\")\n```\n\nThis matches the framework's own behavior on **request-body** validation failures (when the JSON body fails the library schema, the framework already emits the proper `INVALID_REQUEST` envelope). The bug is just that `ValidationError`s raised inside the delegate — typically from a seller's extended request schema — aren't routed the same way.\n\n## Workaround (already shipped seller-side)\n\nWe extended our `@translate_adcp_errors` decorator at `core/platforms/_delegate.py` to also catch `pydantic.ValidationError` and translate to `INVALID_REQUEST` before it escapes to the framework: bokelley/salesagent#330.\n\nEvery seller that extends `RequestModel` (which is the recommended pattern in the SDK docs — `LibraryX as ParentX; class X(ParentX): ...`) will hit this same gap. Fixing at the framework level prevents the eight-line-of-boilerplate-per-seller workaround.\n\n## Tests\n\nCross-transport contract test pattern that exercises real ASGI envelopes:\n\n```python\nimport httpx\nfrom core.main import build_app\n\nasync def test_validation_error_translates_to_invalid_request(transport):\n    app = build_app(...)\n    async with httpx.AsyncClient(transport=httpx.ASGITransport(app=app)) as client:\n        response = await client.post(transport_url, json=bad_request_body)\n        adcp_error = extract_adcp_error_from_envelope(response, transport)\n        assert adcp_error[\"code\"] == \"INVALID_REQUEST\"\n        assert adcp_error[\"recovery\"] == \"correctable\"\n        assert adcp_error[\"field\"]  # populated from validation errors\n```\n\n(See https://github.com/bokelley/salesagent/pull/330 — `tests/integration/test_delegate_wire_envelope_cross_transport.py` — for a working version.)\n\n## Environment\n\n- `adcp` Python SDK: pinned per salesagent's `uv.lock` (2026-05-11)\n- AdCP spec: 3.0.9","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-11T07:10:24Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/652"}

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:cadd3456-d483-1542-0ab1-ea8647c07805
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC974:3F4253:214C7A9:2C4F760:6B018730
html-safe-nonceda65811cec11d26486b9f68ef157a48550993b355fef030929b5dcd697d61f8d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTc0OjNGNDI1MzoyMTRDN0E5OjJDNEY3NjA6NkIwMTg3MzAiLCJ2aXNpdG9yX2lkIjoiNDg4MzY5MDM5MjE4MjE2MzI0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd907ced93311255f2fcf574e87d97a97103f431d22638633a979e930b73d9d8b
hovercard-subject-tagissue:4418789262
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/adcontextprotocol/adcp-client-python/652/issue_layout
twitter:imagehttps://opengraph.githubassets.com/922927ee92cee429b02f3870c9b5a610f626d8abc00d6a7bb92f662173780083/adcontextprotocol/adcp-client-python/issues/652
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/922927ee92cee429b02f3870c9b5a610f626d8abc00d6a7bb92f662173780083/adcontextprotocol/adcp-client-python/issues/652
og:image:altSummary adcp.decisioning.dispatch._invoke_platform_method wraps any uncaught exception from a platform delegate as INTERNAL_ERROR with recovery="terminal". For genuine internals (database failures,...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebokelley
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git
octolytics-dimension-user_id221690821
octolytics-dimension-user_loginadcontextprotocol
octolytics-dimension-repository_id1090305973
octolytics-dimension-repository_nwoadcontextprotocol/adcp-client-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1090305973
octolytics-dimension-repository_network_root_nwoadcontextprotocol/adcp-client-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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/adcontextprotocol/adcp-client-python/issues/652#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F652
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%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F652
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=adcontextprotocol%2Fadcp-client-python
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/652
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/652
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/652
adcontextprotocolhttps://github.com/adcontextprotocol
adcp-client-pythonhttps://github.com/adcontextprotocol/adcp-client-python
Codehttps://github.com/adcontextprotocol/adcp-client-python
Issues44 (44)https://github.com/adcontextprotocol/adcp-client-python/issues
Pull requests13 (13)https://github.com/adcontextprotocol/adcp-client-python/pulls
Actionshttps://github.com/adcontextprotocol/adcp-client-python/actions
Projectshttps://github.com/adcontextprotocol/adcp-client-python/projects
Security and qualityhttps://github.com/adcontextprotocol/adcp-client-python/security
Insightshttps://github.com/adcontextprotocol/adcp-client-python/insights
https://github.com/adcontextprotocol/adcp-client-python
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/652
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/652
#656https://github.com/adcontextprotocol/adcp-client-python/pull/656
Framework wraps pydantic.ValidationError as INTERNAL_ERROR; should be INVALID_REQUESThttps://github.com/adcontextprotocol/adcp-client-python/issues/652#top
#656https://github.com/adcontextprotocol/adcp-client-python/pull/656
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 11, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/652#issue-4418789262
bokelley/salesagent#330https://github.com/bokelley/salesagent/pull/330
bokelley/salesagent#330https://github.com/bokelley/salesagent/pull/330
bokelleyhttps://github.com/bokelley
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on May 11, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/652#event-25369801683
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 11, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/652#issuecomment-4418441023
#656https://github.com/adcontextprotocol/adcp-client-python/pull/656
https://claude.ai/code/session_01J7nYYToyy7PCs6CgQGRAWNhttps://claude.ai/code/session_01J7nYYToyy7PCs6CgQGRAWN
Claude Codehttps://claude.ai/code
bokelleyhttps://github.com/bokelley
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on May 11, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/652#event-25370439950
bokelleyhttps://github.com/bokelley
completedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#656https://github.com/adcontextprotocol/adcp-client-python/pull/656
on May 11, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/652#event-25371096747
bokelleyhttps://github.com/bokelley
on May 11, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/652#event-25371096852
fix(decisioning): wrap pydantic.ValidationError from delegates as INV…https://github.com/adcontextprotocol/adcp-client-python/commit/976ab4f611c93fcfe461cb5e5028b1a13bb90f0a
https://docs.github.com/articles/closing-issues-via-commit-messages
976ab4fhttps://github.com/adcontextprotocol/adcp-client-python/commit/976ab4f611c93fcfe461cb5e5028b1a13bb90f0a
Sign up for freehttps://github.com/signup?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/652
Sign in to commenthttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/652
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
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.