diff --git a/pkg/txapi/resource_translations_async_downloads.go b/pkg/txapi/resource_translations_async_downloads.go index 28f9554..69c6b32 100644 --- a/pkg/txapi/resource_translations_async_downloads.go +++ b/pkg/txapi/resource_translations_async_downloads.go @@ -49,6 +49,11 @@ func PollTranslationDownload(download *jsonapi.Resource, filePath string) error } if download.Redirect != "" { break + } else if download.Attributes["status"] == "failed" { + return fmt.Errorf( + "download of translation '%s' failed", + download.Relationships["resource"].DataSingular.Id, + ) } } resp, err := http.Get(download.Redirect)