Skip to content

Conversation

@anuragchvn-blip
Copy link

Description

Fixes build failures when Salesforce credentials are not configured by gracefully returning empty array in getGrantInitiativeItems().

Changes

  • Graceful credential handling: Added check at start of getGrantInitiativeItems() to return empty array when credentials missing
  • Build-time fallback: Allows static site generation to succeed without Salesforce connection
  • Runtime generation: Pages use ISR with fallback: 'blocking' to generate on first request when credentials available

Impact

  • Enables CI/CD builds without credentials
  • Fixes local development build failures
  • Maintains production functionality via runtime page generation

Testing

Verified npm run build succeeds with:

  • 41 pages generated successfully
  • Warning logs for missing credentials
  • No errors during build process

- Centralized Salesforce credential management to prevent exposure
- Added pre-flight file size validation to prevent DOS attacks
- Implemented numeric field sanitization for data integrity
- Enhanced error handling with structured JSON responses
- Added credential validation with fail-fast pattern
- Upgraded critical error logging for monitoring systems

Resolves security vulnerabilities and data integrity issues across
6 API endpoints without introducing race conditions or memory leaks.
Fixes build failures when SF credentials are not configured by gracefully
returning empty array in getGrantInitiativeItems(). This allows:
- CI/CD builds without credentials
- Local development builds
- Static site generation with fallback: 'blocking' to generate pages at runtime

The pages use ISR (Incremental Static Regeneration) with fallback: 'blocking',
so pages will be generated on first request when credentials are available.
@netlify
Copy link

netlify bot commented Nov 17, 2025

👷 Deploy request for ecosystem-support pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit be2197b

@anuragchvn-blip
Copy link
Author

@pettinarip Would appreciate your review on this fix. This resolves build failures when Salesforce credentials aren't configured, which blocks CI/CD and local development builds.

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