@crowdin/app-project-module 0.56.3 → 0.56.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -87,6 +87,8 @@ function filesCron({ config, integration, period, }) {
87
87
  const syncSettingsList = yield (0, storage_1.getStorage)().getAllSyncSettingsByType('schedule');
88
88
  for (const syncSettings of syncSettingsList) {
89
89
  let projectData;
90
+ let crowdinClient;
91
+ let token;
90
92
  let files = JSON.parse(syncSettings.files);
91
93
  let newFiles = [];
92
94
  const crowdinCredentials = yield (0, storage_1.getStorage)().getCrowdinCredentials(syncSettings.crowdinId);
@@ -116,12 +118,20 @@ function filesCron({ config, integration, period, }) {
116
118
  },
117
119
  },
118
120
  };
119
- const { client: crowdinClient, token } = yield (0, connection_1.prepareCrowdinClient)({
120
- config,
121
- credentials: crowdinCredentials,
122
- autoRenew: true,
123
- context,
124
- });
121
+ try {
122
+ const preparedCrowdinClient = yield (0, connection_1.prepareCrowdinClient)({
123
+ config,
124
+ credentials: crowdinCredentials,
125
+ autoRenew: true,
126
+ context,
127
+ });
128
+ token = preparedCrowdinClient.token;
129
+ crowdinClient = preparedCrowdinClient.client;
130
+ }
131
+ catch (e) {
132
+ (0, logger_1.logError)(e);
133
+ continue;
134
+ }
125
135
  const { expired } = yield (0, subscription_1.checkSubscription)({
126
136
  config,
127
137
  token,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.56.3",
3
+ "version": "0.56.4",
4
4
  "description": "Module that generates for you all common endpoints for serving standalone Crowdin App",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",