fix: clarify seedance reference video failures

This commit is contained in:
stupid-h4er
2026-05-27 22:34:46 +08:00
parent 6d185a6d93
commit 76461e6dba
6 changed files with 58 additions and 2 deletions
+7
View File
@@ -12,6 +12,13 @@ func TestAIUpstreamErrorDetail(t *testing.T) {
}
}
func TestAIUpstreamErrorDetailExplainsSensitiveVideo(t *testing.T) {
got := aiUpstreamErrorDetail([]byte(`{"error":{"code":"InputVideoSensitiveContentDetected.PrivacyInformation","message":"The request failed because the input video may contain real person."}}`))
if !strings.Contains(got, "参考视频疑似包含真人") || !strings.Contains(got, "asset://") {
t.Fatalf("detail = %q", got)
}
}
func TestSafeUpstreamTextTruncates(t *testing.T) {
got := safeUpstreamText(strings.Repeat("错", 320))
if len([]rune(got)) != 303 {