fix: correct Stripe environment variable typo (Stripe_CHANEL_SECRET)#12
fix: correct Stripe environment variable typo (Stripe_CHANEL_SECRET)#12Yuankai619 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request corrects a typo in the environment variable name, changing Stripe_CHANEL_SECRET to Stripe_CHANNEL_SECRET in both the checkout payment route and the Stripe utility file. The reviewer recommended adding an explicit guard check for the existence of this environment variable in lib/stripe.ts to avoid potential runtime errors caused by the non-null assertion operator.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| export function getStripe(): Stripe { | ||
| if (!_stripe) { | ||
| const stripeSecretKey = process.env.Stripe_CHANEL_SECRET; | ||
| const stripeSecretKey = process.env.Stripe_CHANNEL_SECRET; |
There was a problem hiding this comment.
The environment variable Stripe_CHANNEL_SECRET might be undefined at runtime. Using a non-null assertion (!) on the next line without a guard check can lead to runtime errors that are difficult to debug. It is safer to explicitly check for its existence and throw a descriptive error if it is missing.
| const stripeSecretKey = process.env.Stripe_CHANNEL_SECRET; | |
| const stripeSecretKey = process.env.Stripe_CHANNEL_SECRET; | |
| if (!stripeSecretKey) { | |
| throw new Error('Stripe_CHANNEL_SECRET environment variable is missing'); | |
| } |
What does this PR do?
This PR corrects the spelling of the environment variable referenced in the Stripe client initialization and mock key check from `Stripe_CHANEL_SECRET` to the correct `Stripe_CHANNEL_SECRET`.
Why is this change needed?
Link the alert / incident that triggered the investigation:
How was this change tested?
What should reviewers focus on?
The typo has been corrected in both references across the repository.
Out of scope
N/A
Generated by
🤖 Corvo Agent — investigation traced to commit `fe6b67d` (no clear culprit commit, see logs above).