handle error on crowding_update script
This commit is contained in:
parent
ce0e30bfe8
commit
bf46a2b18e
1 changed files with 5 additions and 4 deletions
|
|
@ -40,7 +40,7 @@ var local_file3 = fs.createReadStream(local_file_name3)
|
||||||
|
|
||||||
// obtain the crowdin api key
|
// obtain the crowdin api key
|
||||||
var crowdin_api_key = fs.readFileSync(path.join(__dirname, 'crowdin_api_key.txt'))
|
var crowdin_api_key = fs.readFileSync(path.join(__dirname, 'crowdin_api_key.txt'))
|
||||||
//console.log('api key: ' + crowdin_api_key);
|
//console.log('api key: ' + crowdin_api_key);
|
||||||
|
|
||||||
if (crowdin_api_key != '') {
|
if (crowdin_api_key != '') {
|
||||||
|
|
||||||
|
|
@ -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) {
|
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.
|
// 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) {
|
https.get('https://api.crowdin.com/api/project/' + crowdin_identifier + '/export?key=' + crowdin_api_key, function(res) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue