Skip to content

Commit 2221ffc

Browse files
authored
Merge pull request #201 from transifex/devel
Release Poling translations infinite loop fix
2 parents d19e87b + ee2462a commit 2221ffc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/txapi/resource_translations_async_downloads.go

+5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ func PollTranslationDownload(download *jsonapi.Resource, filePath string) error
4949
}
5050
if download.Redirect != "" {
5151
break
52+
} else if download.Attributes["status"] == "failed" {
53+
return fmt.Errorf(
54+
"download of translation '%s' failed",
55+
download.Relationships["resource"].DataSingular.Id,
56+
)
5257
}
5358
}
5459
resp, err := http.Get(download.Redirect)

0 commit comments

Comments
 (0)