### Is there an existing issue for this? - [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues - [x] I have reviewed the documentation https://docs.sentry.io/ - [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases ### How do you use Sentry? Sentry Saas (sentry.io) ### Which SDK are you using? @sentry/node ### SDK Version 10.45.0 ### Framework Version _No response_ ### Link to Sentry event _No response_ ### Reproduction Example/SDK Setup The Anthropic SDK supports calling .withResponse() on the result of `client.messages.create()`, see https://platform.claude.com/docs/en/api/sdks/typescript#accessing-raw-response-data-e-g-headers. It seems that Sentry's integration does not maintain this API interface, since trying to call `withResponse()` on a wrapped result ends up with the error: `result.withResponse is not a function` I believe this is the same issue as https://github.com/getsentry/sentry-javascript/issues/19073, just for Anthropic instrumentation. ### Steps to Reproduce 1. Enable Anthropic integration (on by default) 2. Call client.messages.create({ ... }).withResponse() 3. Error is thrown. ### Expected Result Sentry's integration should not break this API. ### Actual Result result.withResponse is not a function ### Additional Context _No response_ ### Priority <sub>React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.</sub>
Activity
linear-code commentedon Mar 20, 2026
JS-1977
nicohrubec commentedon Mar 20, 2026
Hey @jankalfus, thanks for writing in! I'll put this on my list for next week to take a look at.
nicohrubec commentedon Mar 23, 2026
I was able to reproduce the issue here: getsentry/repro#34
Will try to come up with a fix, should hopefully be straightforward given that we already solved this for the
openaiintegration as you mentioned.fix(core): Preserve .withResponse() on Anthropic instrumentation (#19935
nicohrubec commentedon Mar 24, 2026
Just merged the fix for this, will go out with the next release!
jankalfus commentedon Mar 25, 2026
Awesome, thank you!
github-actions commentedon Mar 25, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #19935, which was included in the 10.46.0 release.