improve error handling for overly long search queries
when users submit search queries exceeding turbopuffer's 1024 character limit for BM25 text search, the application now returns a 400 Bad Request with a helpful error message instead of a generic 500 Internal Server Error.
changes:
- add TurbopufferError enum to categorize different error types
- parse turbopuffer API error responses to detect query length violations
- return 400 status with user-friendly message for query length errors
- maintain 500 status for genuine server errors
this fix ensures users understand the limitation and can adjust their queries accordingly, without falsely suggesting a server-side problem.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>