mirror of
https://github.com/Comfy-Org/Comfy-PR.git
synced 2026-11-04 23:37:33 +00:00
[PR #85] [MERGED] fix: filter out invalid repository values in /api/repo-urls endpoint #84
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/Comfy-PR#84
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/85
Author: @snomiao
Created: 10/9/2025
Status: ✅ Merged
Merged: 10/9/2025
Merged by: @snomiao
Base:
main← Head:sno-debug-repo-urls-endpoint📝 Commits (2)
ad641a0fix: filter out invalid repository values in /api/repo-urls endpoint83031dcMerge branch 'main' into sno-debug-repo-urls-endpoint📊 Changes
2 files changed (+62 additions, -0 deletions)
View changed files
➕
app/api/router.test.ts(+61 -0)📝
app/api/router.ts(+1 -0)📄 Description
Summary
/api/repo-urlsendpoint which was failing with "Output validation failed" errorundefined,null, and empty strings)Test plan
app/api/router.test.tswith 3 test casesRoot Cause
The endpoint was returning data from MongoDB that included documents with invalid
repositoryvalues (undefined, null, or empty strings), which failed the Zod output validationz.array(z.string()).Solution
Added a filter step to the sflow pipeline:
.filter((repo) => typeof repo === "string" && repo.length > 0)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.