@lingo.dev/_sdk 0.9.2 → 0.9.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.
- package/build/index.cjs +9 -3
- package/build/index.mjs +9 -3
- package/package.json +2 -2
package/build/index.cjs
CHANGED
@@ -89,7 +89,9 @@ var LingoDotDevEngine = class {
|
|
89
89
|
if (!res.ok) {
|
90
90
|
if (res.status >= 500 && res.status < 600) {
|
91
91
|
const errorText = await res.text();
|
92
|
-
throw new Error(
|
92
|
+
throw new Error(
|
93
|
+
`Server error (${res.status}): ${res.statusText}. ${errorText}. This may be due to temporary service issues.`
|
94
|
+
);
|
93
95
|
} else if (res.status === 400) {
|
94
96
|
throw new Error(`Invalid request: ${res.statusText}`);
|
95
97
|
} else {
|
@@ -348,7 +350,9 @@ var LingoDotDevEngine = class {
|
|
348
350
|
});
|
349
351
|
if (!response.ok) {
|
350
352
|
if (response.status >= 500 && response.status < 600) {
|
351
|
-
throw new Error(
|
353
|
+
throw new Error(
|
354
|
+
`Server error (${response.status}): ${response.statusText}. This may be due to temporary service issues.`
|
355
|
+
);
|
352
356
|
}
|
353
357
|
throw new Error(`Error recognizing locale: ${response.statusText}`);
|
354
358
|
}
|
@@ -375,7 +379,9 @@ var LingoDotDevEngine = class {
|
|
375
379
|
};
|
376
380
|
}
|
377
381
|
if (res.status >= 500 && res.status < 600) {
|
378
|
-
throw new Error(
|
382
|
+
throw new Error(
|
383
|
+
`Server error (${res.status}): ${res.statusText}. This may be due to temporary service issues.`
|
384
|
+
);
|
379
385
|
}
|
380
386
|
return null;
|
381
387
|
} catch (error) {
|
package/build/index.mjs
CHANGED
@@ -89,7 +89,9 @@ var LingoDotDevEngine = class {
|
|
89
89
|
if (!res.ok) {
|
90
90
|
if (res.status >= 500 && res.status < 600) {
|
91
91
|
const errorText = await res.text();
|
92
|
-
throw new Error(
|
92
|
+
throw new Error(
|
93
|
+
`Server error (${res.status}): ${res.statusText}. ${errorText}. This may be due to temporary service issues.`
|
94
|
+
);
|
93
95
|
} else if (res.status === 400) {
|
94
96
|
throw new Error(`Invalid request: ${res.statusText}`);
|
95
97
|
} else {
|
@@ -348,7 +350,9 @@ var LingoDotDevEngine = class {
|
|
348
350
|
});
|
349
351
|
if (!response.ok) {
|
350
352
|
if (response.status >= 500 && response.status < 600) {
|
351
|
-
throw new Error(
|
353
|
+
throw new Error(
|
354
|
+
`Server error (${response.status}): ${response.statusText}. This may be due to temporary service issues.`
|
355
|
+
);
|
352
356
|
}
|
353
357
|
throw new Error(`Error recognizing locale: ${response.statusText}`);
|
354
358
|
}
|
@@ -375,7 +379,9 @@ var LingoDotDevEngine = class {
|
|
375
379
|
};
|
376
380
|
}
|
377
381
|
if (res.status >= 500 && res.status < 600) {
|
378
|
-
throw new Error(
|
382
|
+
throw new Error(
|
383
|
+
`Server error (${res.status}): ${res.statusText}. This may be due to temporary service issues.`
|
384
|
+
);
|
379
385
|
}
|
380
386
|
return null;
|
381
387
|
} catch (error) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lingo.dev/_sdk",
|
3
|
-
"version": "0.9.
|
3
|
+
"version": "0.9.4",
|
4
4
|
"description": "Lingo.dev JS SDK",
|
5
5
|
"private": false,
|
6
6
|
"publishConfig": {
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"@paralleldrive/cuid2": "^2.2.2",
|
22
22
|
"jsdom": "^25.0.1",
|
23
23
|
"zod": "^3.24.1",
|
24
|
-
"@lingo.dev/_spec": "0.
|
24
|
+
"@lingo.dev/_spec": "0.38.0"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
27
|
"@types/jsdom": "^21.1.7",
|