Skip to content

Conversation

@vercel-ai-sdk
Copy link
Contributor

@vercel-ai-sdk vercel-ai-sdk bot commented Oct 9, 2025

This is an automated backport of #9249 to the release-v5.0 branch.

…9249)

## Background

The JSONRPC spec (for MCP) has a `data` field which is important for
doing [x402 over
mcp](https://github.com/coinbase/x402/blob/main/specs/transports/mcp.md#payment-required-signaling)
The AI-SDK didn't expose `error.data`, only `error.message`

## Summary

added the `data` property to the MCPClientError to capture the
`error.data` from the response

## Manual Verification

Added unit test

## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [ ] Documentation has been added / updated (for bug fixes / features)
- [x] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [x] Formatting issues have been fixed (run `pnpm prettier-fix` in the
project root)

## Related Issues

Fixes #9248
@aayush-kapoor aayush-kapoor merged commit e33947b into release-v5.0 Oct 9, 2025
13 checks passed
@aayush-kapoor aayush-kapoor deleted the backport-pr-9249-to-release-v5.0 branch October 9, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant