Add bun run live:dev; log Spotify's reason on token failures #49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/live-dev-script"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Running the app server locally meant a long command with the test settings and Spotify credentials typed inline, even though the credentials belong in
.env. When the Spotify secret was wrong, the server only reportedSpotify token request failed: 400, which gave no clue why.Solution
bun run live:dev: runs the app server in test mode (self-signed DJ tokens, the e2e token secret,uat-live.db). It takesSPOTIFY_CLIENT_IDandSPOTIFY_CLIENT_SECRETfrom.envthrough Bun's automatic loading. The test settings stay out of.env, because every Bun process in the repo loads that file, the console included.400 {"error":"invalid_client","error_description":"Invalid client"}, which was the clue that the first secret came from a different app. The test now asserts the reason is included.live:dev. They also record that client-credentials search is verified for this app, as of 2026-09-28: 10 results with cover art.Testing
bun run test: 211 pass. The tightened Spotify test fails without the fix.bun run checkis clean.bun run live:devstarts with real Spotify search (no fake-catalog warning), and/live/healthreturns 200.🤖 Generated with Claude Code