fix: gate documentsdb/vectorsdb list calls behind multi-db flag#2991
fix: gate documentsdb/vectorsdb list calls behind multi-db flag#2991premtsd-code merged 1 commit intomainfrom
Conversation
Greptile SummaryThis PR fixes spurious 404 errors on environments where Confidence Score: 5/5Safe to merge — targeted one-method change with no regressions on the existing code paths. The fix is well-scoped, the logic is correct, and isFlagEnabled already handles null stores safely via optional chaining. All remaining observations are P2 or below. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix: gate documentsdb/vectorsdb list cal..." | Re-trigger Greptile |
Summary
The
useDatabaseSdk().list()helper was unconditionally calling all three backends in parallel (tablesDB,documentsDB,vectorsDB), causing 404s on environments where the documentsdb/vectorsdb routes aren't exposed (e.g. staging/production withisDevelopment()gate) even when themulti-dbfeature flag is off.Fix
Gate the documentsdb/vectorsdb list calls behind
flags.multiDb. When the flag is off, onlytablesDB.list()is called.Test plan
PUBLIC_CONSOLE_FEATURE_FLAGS=(empty): only/v1/tablesdbis called from the databases pagePUBLIC_CONSOLE_FEATURE_FLAGS=multi-db: all three endpoints are called as beforeflags-multi-dbalso enable all three