Skip to content

Added missing wholesale env check during build time - #205

Merged
damianlegawiec merged 1 commit into
mainfrom
fix/build-wholesale-check
Jul 28, 2026
Merged

Added missing wholesale env check during build time#205
damianlegawiec merged 1 commit into
mainfrom
fix/build-wholesale-check

Conversation

@damianlegawiec

@damianlegawiec damianlegawiec commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes
    • Wholesale channel retrieval now safely returns no result when the wholesale feature is disabled, instead of attempting an unavailable request.
    • Improved behavior for configurations where the wholesale addon is turned off.

@strix-security

strix-security Bot commented Jul 28, 2026

Copy link
Copy Markdown

Strix Security Review

No security issues found.

Updated for a4f5e3e.


Reviewed by Strix
Re-run review · Configure security review settings

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
storefront Ready Ready Preview, Comment Jul 28, 2026 11:55am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0ecfdfeb-fbeb-40a4-800a-7a9638e46983

📥 Commits

Reviewing files that changed from the base of the PR and between fcfe5e8 and a4f5e3e.

📒 Files selected for processing (1)
  • src/lib/data/wholesale.ts

Walkthrough

getWholesaleChannel() now checks whether wholesale is enabled before fetching channel data. When disabled, it returns null without invoking the fallback client, and its documentation describes the non-throwing behavior.

Changes

Wholesale channel loading

Layer / File(s) Summary
Guard wholesale channel loading
src/lib/data/wholesale.ts
Imports isWholesaleEnabled() and returns null before fetching when wholesale is disabled; the documentation reflects this behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

I’m a rabbit guarding the channel with care,
If wholesale is off, there’s nothing to fetch there.
A quiet null hops neatly along,
No errors disturb the layout song.
Thump-thump— the safe path is strong!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the core change: adding a wholesale environment check before fetching the channel.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/build-wholesale-check

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@damianlegawiec
damianlegawiec merged commit b944069 into main Jul 28, 2026
8 checks passed
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