Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload translations doesn't report failure in case of server faults #771

Closed
pastey opened this issue Apr 18, 2024 · 1 comment
Closed

upload translations doesn't report failure in case of server faults #771

pastey opened this issue Apr 18, 2024 · 1 comment

Comments

@pastey
Copy link

pastey commented Apr 18, 2024

Describe the bug

crowdin upload translations returns zero exit code (success) despite the fact that half of the files didn't actually upload and there were server errors in the logs.

$ crowdin upload translations -b <redacted> --import-eq-suggestions --plain
❌ Failed to upload the translation file 'Resources/de.lproj/Localizable.strings'. Please contact our support team for help
❌ Error from server: <Code: <empty_code>, Message: Request aborted>
❌ Failed to upload the translation file 'Resources/ru.lproj/Localizable.strings'. Please contact our support team for help
❌ Error from server: <Code: <empty_code>, Message: Request aborted>
❌ Failed to upload the translation file 'Resources/es.lproj/Localizable.strings'. Please contact our support team for help
❌ Error from server: <Code: <empty_code>, Message: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: (String)"<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>
"; line: 1, column: 2]>
❌ Failed to upload the translation file 'Resources/uk.lproj/Localizable.strings'. Please contact our support team for help
❌ Error from server: <Code: <empty_code>, Message: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: (String)"<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>
"; line: 1, column: 2]>
Resources/es.lproj/AppShortcuts.strings
Resources/fr.lproj/AppShortcuts.strings
Resources/uk.lproj/AppShortcuts.strings
....

All this kept working and ended up with the zero (success) exit code.

Expected behavior

Exit with non-zero exit code if anything goes wrong during upload. Otherwise we end up with corrupted localization.

Environment:

  • OS: macOS
  • Version: 14.4.1
@andrii-bodnar
Copy link
Member

Hi @pastey, we've made a lot of improvements to exit codes and error handling in the upcoming CLI v4. Could you please try downloading the latest build and see if it fixes the current issue?

https://github.com/crowdin/crowdin-cli/actions?query=branch%3Anext-v4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants