CaseMark stops hiding the demo paywall behind 404s

A production bug made the budget cap look like missing documents - until kveton chased the real error to the surface.

infrastructurechat-ui

Document previews in CaseMark's fork were failing with generic not-found errors, even though the files existed and were ready to serve. The actual cause was a demo budget cap firing inside Case Vault, the storage layer - but that signal was getting flattened into nulls on the way out, so users and operators alike saw the wrong story.

kveton rewired the error path so the budget signal survives all the way from storage through to the viewer. The DOCX preview is now streamed through CaseMark's own backend rather than redirecting the browser off to a signed storage URL, which keeps the error inside one trusted hop where it can be read correctly. PDF and DOCX viewers now show a plain demo-budget message instead of a cryptic load failure. From open to merge: about twenty-five minutes.

So what Anyone running a metered demo of a legal-AI product should care - masked paywall errors look exactly like product bugs, and the fix is mostly editorial honesty in the error surface.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

3 commits from CaseMark/mikeoss-casedotdev, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
5e899345 Surface demo budget errors for document loads kveton 2026-05-04 ↗ GitHub
c4a955e2 Tune demo usage metering kveton 2026-05-04 ↗ GitHub
57ba208c Harden document load error responses kveton 2026-05-04 ↗ GitHub

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-282.md from inside the repo you want the changes in.

⬇ Download capture-thread-282.md