chore: temporary fix sync script error (#3044)

(cherry picked from commit 2e0f410978)
This commit is contained in:
JimmFly
2023-07-06 12:30:01 +08:00
committed by Alex Yang
parent aa31043871
commit c53638c08d

View File

@@ -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;