Skip to content

frontend: ask the API for JSON so errors show their message; on-dev picks up new migrations - #120

Merged
ndbroadbent merged 2 commits into
mainfrom
ui-accept-json
Dec 3, 2026
Merged

ndbroadbent merged 2 commits into
mainfrom
ui-accept-json

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

The web app's API client now sends Accept: application/json on every request.

app/ (Laravel Rust) answers an error as JSON, with its description, only to a request that asks for JSON. The old server always answered JSON. Since cutover, every error in the web app has shown "Request failed (403)" and the like instead of what went wrong ("only admins can change the setup checklist", a taken slug, a refused link).

It's the same change as in #119, split out so it can merge as soon as merges reopen. The identical hunk rebases cleanly under #119.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

on-dev: a new migration reaches the box build

app/build.rs reads the migration list again only when app/database/migrations changes. rsync gives a new file its old mtime, so a box build after a sync compiled the old list in ("column … does not exist" at run time). After its rsync, scripts/on-dev now touches that folder on the remote when the sync added or removed a migration file (read from rsync's -i list). It doesn't touch it on every sync, which would rebuild the app every time. CI's fresh checkout isn't affected.

@ndbroadbent ndbroadbent changed the title frontend: ask the API for JSON so errors show their message frontend: ask the API for JSON so errors show their message; on-dev picks up new migrations Dec 3, 2026
…ive with their description instead of 'Request failed (403)'
…or removes a migration, so build.rs lists the new set (rsync keeps a new file's old mtime)
@ndbroadbent
ndbroadbent merged commit cf67b37 into main Dec 3, 2026
12 checks passed
@ndbroadbent
ndbroadbent deleted the ui-accept-json branch December 3, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant