Skip to content

fix: normalize divine video detail responses#1

Merged
rabble merged 1 commit into
mainfrom
fix/video-hex-crash
Apr 5, 2026
Merged

fix: normalize divine video detail responses#1
rabble merged 1 commit into
mainfrom
fix/video-hex-crash

Conversation

@rabble
Copy link
Copy Markdown
Member

@rabble rabble commented Apr 5, 2026

Summary

  • normalize nested /api/videos/:id responses into the flat video shape used by the app
  • add a regression test for the { event, stats } payload that was crashing /video/:id
  • fail fast on invalid video detail payloads so the route errors cleanly instead of throwing inside npubEncode

Test Plan

  • npx vitest run src/lib/divine-api.test.ts
  • npx tsc --noEmit --pretty false
  • npm test
  • direct fetchVideo() check against the production video ID that was crashing

@rabble rabble merged commit 341ba9f into main Apr 5, 2026
2 checks passed
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