micro/go-micro · error
video generation failed: %s
Error message
video generation failed: %s
What it means
The AtlasCloud video job reached terminal status 'failed' and the library surfaces the provider-supplied error text (pollResp.Data.Error) wrapped in this message. It means the generation itself failed upstream; the library is relaying the remote failure. The %s portion contains the provider's reason string.
Source
Thrown at ai/atlascloud/atlascloud.go:1172
var pollResp struct {
Data struct {
Status string `json:"status"`
Outputs []string `json:"outputs"`
Error string `json:"error"`
} `json:"data"`
}
if err := json.Unmarshal(body, &pollResp); err != nil {
return nil, fmt.Errorf("failed to parse poll response: %w", err)
}
switch pollResp.Data.Status {
case "completed", "succeeded":
if len(pollResp.Data.Outputs) == 0 {
return nil, fmt.Errorf("video completed but no outputs returned")
}
return &ai.VideoResponse{URL: pollResp.Data.Outputs[0]}, nil
case "failed":
return nil, fmt.Errorf("video generation failed: %s", pollResp.Data.Error)
default:
return nil, nil
}
}
View on GitHub (pinned to 24529f1404)
Solutions
- Read the %s suffix for the provider's failure reason and address it (rephrase prompt, adjust parameters).
- Verify account quota/credits with AtlasCloud if the reason indicates limits or billing.
- Retry with simplified or safer prompt content if the reason suggests policy rejection.
- Check requested model/parameters against current API docs for validity.
Example fix
// before
resp, err := provider.GenerateVideo(ctx, req)
if err != nil { log.Fatal(err) }
// after
resp, err := provider.GenerateVideo(ctx, req)
if err != nil {
if strings.Contains(err.Error(), "video generation failed:") {
reason := strings.TrimPrefix(err.Error(), "video generation failed: ")
log.Printf("provider rejected job: %s", reason)
}
return err
} Defensive patterns
Strategy: try-catch
Validate before calling
if err := validatePromptForPolicy(req.Prompt); err != nil {
return fmt.Errorf("prompt likely rejected: %w", err)
} Type guard
func isProviderJobFailure(err error) bool {
return err != nil && strings.Contains(err.Error(), "video generation failed:")
} Try / catch
video, err := provider.GenerateVideo(ctx, req)
if err != nil {
if isProviderJobFailure(err) {
reason := strings.TrimPrefix(err.Error(), "video generation failed: ")
log.Printf("job rejected by provider: %s", reason)
return fmt.Errorf("video job failed upstream: %s", reason)
}
return err
} Prevention
- Pre-screen prompts for policy-sensitive content before submitting
- Keep request parameters within documented model limits
- Monitor provider quota/credits programmatically
- Do not blind-retry 'failed' jobs — read the reason first
When it happens
Trigger: Calling video generation and polling a job whose poll response reported status == "failed"; the message includes pollResp.Data.Error verbatim.
Common situations: Content-policy rejections of the prompt; unsupported parameter combinations (resolution/duration); insufficient provider credits or quota; model-specific capacity issues.
Related errors
- video completed but no outputs returned
- API request failed: %w
- failed to parse response: %w
- no response from API
- API error (%s): %s
AI-assisted analysis of micro/go-micro@24529f1404 (2026-09-01).
Data as JSON: /api/errors/74381a14d969d40e.
Report an issue: GitHub.