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