Emit warning when stripe-notify header is present in response#7
Emit warning when stripe-notify header is present in response#7shivampkumar wants to merge 1 commit into
stripe-notify header is present in response#7Conversation
There was a problem hiding this comment.
✅ VibeOps Review — No issues found. Clean PR.
🟢 Auto-approval eligible · L2 NONE · 90% confidence
💭 Heads-up · new code, no historical precedent (2)
Agent-confident findings on patterns we haven't seen reviewed before in this repo. Not blocking. Skim, ignore, or address.
**The rawRequest() method does not call maybeEmitStripeNotice(response** src/main/java/com/stripe/net/LiveStripeResponseGetter.java:226`
The rawRequest() method does not call maybeEmitStripeNotice(response.headers()) after receiving the response, even though the sibling methods request() (line 137) and requestStream() (line 182) both do. This means callers using rawRequest() — the raw/low-level API path — will silently miss any Stripe-Notice deprecation warnings that Stripe sends back in the response headers.
🔗 Backed by: agent reasoning
The rawRequest method does not call maybeEmitStripeNotice, breaking parity with request and requestStream which
src/main/java/com/stripe/net/LiveStripeResponseGetter.java:200
The rawRequest method does not call maybeEmitStripeNotice, breaking parity with request and requestStream which both emit the warning. Any caller using rawRequest will silently miss Stripe-Notice header warnings, even though the response headers are available at that point.
🔗 Backed by: agent reasoning · verifier read the file
What's good
- Clean changeset with no findings from any reviewer.
Reviewed by VibeOps
|
💭 Heads-up · Bug · The
Was this helpful? React with 👍 or 👎 to help VibeOps learn. |
|
💭 Heads-up · Bug · The
Was this helpful? React with 👍 or 👎 to help VibeOps learn. |
Why?
We've noticed a trend where users (and their agents) will sometimes reach for suboptimal API endpoints/methods because of outdated information. For example, using
/v1/accountswhen/v2/core/accountsis available and has a superset of the functionality from v1.In an effort to help steer users towards best practices, we're introducing a new header to provide feedback during the development process. The SDK is responsible for surfacing this header, if present.
Once enabled internally, the header will be returned by the server for:
We may tweak that going forwards. But no matter the conditions, the SDKs will act as a thin pipe.
What?
Stripe-Noticeheader in a response. Note this is the first warning we're emitting in this SDK, so make sure it's the correct way to do that!See Also
Mirrored from stripe/stripe-java#2219 by
xavdidfor the VibeOps live demo. Real PR, real diff, reviewed by the same pipeline our customers run.