Open
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- server.ts: wrap res.json() in process_video and publish_clip handlers - transcript.ts: wrap JSON.parse on YouTube subtitle data - publisher.ts: wrap res.json() on Late.dev API responses Prevents "Unexpected end of JSON input" crashes when external APIs return empty or malformed responses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for clipbot ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The process_video tool was calling http://localhost:3000/api/runs which requires the Next.js dev server to be running. Now the http-server imports run-store and pipeline-worker directly to spawn the pipeline without needing Next.js. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…xt.js Both tools now call pipeline-worker, run-store, and Late.dev API directly instead of fetching localhost:3000 API routes. The http-server is now a thin passthrough since all logic lives in the tool execute functions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The old description "Download, analyze, clip, and optionally publish" didn't clearly signal this is the tool for creating clips. Gemini was hallucinating tool names like "create_clip_pipeline" instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
res.json()inprocess_videoandpublish_cliptool handlers to prevent crashes on malformed API responsesJSON.parse()on YouTube transcript data intranscript.tsres.json()on Late.dev API responses inpublisher.tsRoot cause: when YouTube returns empty subtitles or the API server returns non-JSON errors, the pipeline crashes with "Unexpected end of JSON input" (HTTP 500).
Test plan
process_videowith a YouTube URL — should return error message instead of crashingpublish_clipwhen Late.dev is down — should return error message instead of crashing🤖 Generated with Claude Code