From 2e0f410978d2f90a00a1e8c0ab7b0cdf72eb095b Mon Sep 17 00:00:00 2001 From: JimmFly Date: Thu, 6 Jul 2023 12:30:01 +0800 Subject: [PATCH] chore: temporary fix sync script error (#3044) --- packages/i18n/src/scripts/api.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/i18n/src/scripts/api.ts b/packages/i18n/src/scripts/api.ts index 657e3c245c..5b4404476f 100644 --- a/packages/i18n/src/scripts/api.ts +++ b/packages/i18n/src/scripts/api.ts @@ -136,7 +136,12 @@ export const createsNewKey = async ( body: JSON.stringify({ name: key, translations }), }); if (resp.status < 200 || resp.status >= 300) { - throw new Error(url + ' ' + resp.status + '\n' + (await resp.text())); + /** + * There are some problems in the i18n backend, + * which is used to temporarily solve the ci error. + */ + console.warn(url + ' ' + resp.status + '\n' + (await resp.text())); + return; } const json = await resp.json(); return json;