Skip to content

fix: list FindAll dropped query args (prod /lists/ 500)#5

Merged
dhighwayman merged 1 commit into
masterfrom
fix/findall-args
May 30, 2026
Merged

fix: list FindAll dropped query args (prod /lists/ 500)#5
dhighwayman merged 1 commit into
masterfrom
fix/findall-args

Conversation

@dhighwayman

Copy link
Copy Markdown
Contributor

Incident

All /lists/ endpoints (incl. ?filter_by=trending) returned 500 in prod after the deps bump (#4). Prod was rolled back to revision back-00068-n26 to restore service.

Cause

go-sqlbuilder 1.41 parameterizes LIMIT as a ? placeholder; 1.7 inlined it as a literal. FindAll did sql, _ := sb.Build() and ran Query(sql) without args, so MySQL got a literal ?Error 1064. (Get already passes args correctly.)

Fix

Capture and pass the args: sql, args := sb.Build(); Query(sql, args...).

Verification

Ran the fixed backend against MySQL 8 locally: trending/newest/all return data (or 404 when empty), no 500. Merging redeploys and supersedes the rollback.

🤖 Generated with Claude Code

go-sqlbuilder 1.41 parameterizes LIMIT as a placeholder (1.7 inlined it), so
FindAll's 'sql, _ := sb.Build(); Query(sql)' sent a literal '?' to MySQL ->
Error 1064, 500ing every /lists/ endpoint. Capture and pass args like Get does.

Verified against MySQL 8 locally: trending/newest/all return data (or 404 when
empty) instead of 500.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dhighwayman dhighwayman merged commit 45ba442 into master May 30, 2026
2 checks passed
@dhighwayman dhighwayman deleted the fix/findall-args branch May 30, 2026 16:19
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