Fix Fly.io health checks and Stripe API expand depth#509
Merged
Conversation
- Remove data.lines.data.price.product from Stripe API expand arrays (exceeds 4-level depth limit causing errors) - Add product caching in getPendingInvoices to fetch products separately - Configure Express trust proxy for Fly.io to fix rate limiter IP detection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change health check path from "/" to "/health" - The homepage "/" can be slow due to external API calls (Stripe, etc.) - The /health endpoint is designed for quick health checks - Increase timeout from 2s to 5s and grace_period from 5s to 30s to allow proper initialization on startup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/healthendpoint instead of/(homepage)Details
Health Check Fix
The health check was configured to hit
/(homepage) which can be slow due to external API calls. Changed to use the dedicated/healthendpoint that only checks database connectivity and Addie readiness.Also increased timeout from 2s to 5s and grace period from 5s to 30s to allow proper initialization.
Stripe API Fix
Removed
data.lines.data.price.productfrom Stripe API expand arrays (5 levels exceeds 4-level limit). Added product caching ingetPendingInvoicesto fetch product names separately.Trust Proxy
Added
app.set('trust proxy', 1)for Fly.io to fix rate limiter IP detection warnings.Test plan
🤖 Generated with Claude Code