Purpose
This runbook provides step-by-step procedures to investigate and resolve the most common incidents on Winstory.io. It is meant for:- On-call engineers
- SRE / DevOps
1. Dashboard or MyWin not loading
Symptoms:/mywin/creationsspins indefinitely- Dashboard shows “Failed to fetch”
- Check
system_error_logsin Supabase for recent entries:- Filter by
errorType = 'ApiError'andcreated_at DESC
- Filter by
- Verify
/api/campaigns/dashboardand/api/campaigns/moderation:- Call them directly with a known
campaignId/walletAddress
- Call them directly with a known
- If DB errors:
- Check Supabase status and connection limits
- If timeouts:
- Verify recent changes in metrics or dashboard code
2. Payments failing (Stripe or Crypto)
Symptoms:- Campaigns not created after payment
- Creators report “Payment taken but no campaign”
- Search
system_error_logsforerrorType = 'PaymentError'orseverity = 'critical'. - For crypto:
- Use
/api/cron/monitor-onchainor manually callverifyCryptoTransactionOnChain(seelib/crypto-payment-verification.ts).
- Use
- For Stripe:
- Check
/api/payment/webhooklogs and Stripe dashboard events.
- Check
- Verify
paymentstable:provider_id(tx hash or Stripe payment id)status(should beONCHAINorSUCCEEDED)
3. On-chain inconsistencies
Symptoms:- Dashboard shows mismatched status vs actual blockchain
- Rewards not distributed as expected
- Run
/api/cron/monitor-onchainmanually and inspect response. - Check
campaign_blockchain_mappingvs on-chain:blockchain_campaign_idcreation_tx_hash
- Use the Base Sepolia testing scripts in
scripts/:npx hardhat run scripts/test-base-sepolia-e2e.js --network baseSepolia
4. Rate limiting issues (429)
Symptoms:- Users see “Rate limit exceeded” on API calls
- Confirm origin:
- App-level middleware (
middleware.ts) - External WAF or CDN rules
- App-level middleware (
- For app-level:
- Adjust
MAX_REQUESTS/WINDOW_MSinmiddleware.ts - Deploy and monitor
429frequency
- Adjust
5. General error escalation
If an incident cannot be resolved quickly:- Escalate with:
- Recent logs from
system_error_logs - Offending endpoint(s) and payload samples
- Timeline of events (deploys, config changes)
- Recent logs from