@lonca/trendyol 0.11.2 → 0.11.3
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/dist/index.cjs +1 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -18
- package/dist/index.js.map +1 -1
- package/dist/testing.cjs +1 -17
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.js +2 -18
- package/dist/testing.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2755,23 +2755,7 @@ function mapHttpError(status, body, retryAfterMs) {
|
|
|
2755
2755
|
}
|
|
2756
2756
|
function normalizeErrorIssues(body) {
|
|
2757
2757
|
const errors = extractErrorsArray(body);
|
|
2758
|
-
|
|
2759
|
-
const issues = [];
|
|
2760
|
-
for (const entry of errors) {
|
|
2761
|
-
if (typeof entry === "string") {
|
|
2762
|
-
issues.push({ message: entry });
|
|
2763
|
-
continue;
|
|
2764
|
-
}
|
|
2765
|
-
if (entry && typeof entry === "object") {
|
|
2766
|
-
const e = entry;
|
|
2767
|
-
if (typeof e.message !== "string") continue;
|
|
2768
|
-
const issue = { message: e.message };
|
|
2769
|
-
if (typeof e.field === "string") issue.field = e.field;
|
|
2770
|
-
if (typeof e.code === "string") issue.code = e.code;
|
|
2771
|
-
issues.push(issue);
|
|
2772
|
-
}
|
|
2773
|
-
}
|
|
2774
|
-
return issues;
|
|
2758
|
+
return errors ? core.normalizeIssueEntries(errors) : [];
|
|
2775
2759
|
}
|
|
2776
2760
|
function extractErrorsArray(body) {
|
|
2777
2761
|
if (!body || typeof body !== "object") return void 0;
|