handle error on crowding_update script

This commit is contained in:
Gabriel Bazán 2016-12-09 11:32:50 -03:00
parent ce0e30bfe8
commit bf46a2b18e
1 changed files with 5 additions and 4 deletions

View File

@ -51,7 +51,8 @@ if (crowdin_api_key != '') {
};
bhttp.post('https://api.crowdin.com/api/project/' + crowdin_identifier + '/update-file?key=' + crowdin_api_key, payload, {}, function(err, response) {
console.log('\nResponse from update file call:\n', response.body.toString());
if (!err) console.log('\nResponse from update file call:\n', response.body.toString());
else console.log('\nError from update file call:\n', err.toString());
// This call will tell the server to generate a new zip file for you based on most recent translations.
https.get('https://api.crowdin.com/api/project/' + crowdin_identifier + '/export?key=' + crowdin_api_key, function(res) {