Files
PaperClipAI/server/src/__tests__
PaperclipandClaude Opus 5.5 2f319bdadd fix(server): pass a Cloud portfolio rate limit through as 429
Paperclip Cloud answers the tenant portfolio read with 429 when it throttles
a stack. The proxy turned that into a 502 and reported it to Sentry as a
server fault (PAPERCLIP-BACKEND-70). Return 429 with Cloud's bounded
Retry-After hint instead, log the bounded diagnostics, and keep the
throttled answer out of the portfolio cache. Other upstream failures keep
the 502 contract and crash report.

Fixes PAPERCLIP-BACKEND-70

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:07:00 +00:00
..
…

Server Tests

Server tests that need a real PostgreSQL process must use ./helpers/embedded-postgres.ts instead of constructing embedded-postgres directly.

The shared helper creates a throwaway data directory and a reserved-safe loopback port for each test database. This protects the live Paperclip control-plane Postgres from server vitest runs; see PAP-2033 for the incident that introduced this guard.