@rawnodes/logger 2.10.0 → 2.11.0

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.mjs CHANGED
@@ -1682,13 +1682,22 @@ function extractAxiosHttpData(error) {
1682
1682
  }
1683
1683
  }
1684
1684
  if (error.config) {
1685
- const { url, baseURL, method } = error.config;
1685
+ const { url, baseURL, method, params, data, headers } = error.config;
1686
1686
  if (url) {
1687
1687
  httpData.url = baseURL && !url.startsWith("http") ? `${baseURL}${url}` : url;
1688
1688
  }
1689
1689
  if (method) {
1690
1690
  httpData.method = method.toUpperCase();
1691
1691
  }
1692
+ if (params !== void 0) {
1693
+ httpData.params = sanitizeResponseData(params);
1694
+ }
1695
+ if (data !== void 0) {
1696
+ httpData.requestData = sanitizeResponseData(data);
1697
+ }
1698
+ if (headers !== void 0) {
1699
+ httpData.requestHeaders = sanitizeResponseData(headers);
1700
+ }
1692
1701
  }
1693
1702
  return httpData;
1694
1703
  }
@@ -1726,6 +1735,18 @@ function extractGenericHttpData(error) {
1726
1735
  httpData.method = config.method.toUpperCase();
1727
1736
  hasData = true;
1728
1737
  }
1738
+ if (config.params !== void 0) {
1739
+ httpData.params = sanitizeResponseData(config.params);
1740
+ hasData = true;
1741
+ }
1742
+ if (config.data !== void 0) {
1743
+ httpData.requestData = sanitizeResponseData(config.data);
1744
+ hasData = true;
1745
+ }
1746
+ if (config.headers !== void 0) {
1747
+ httpData.requestHeaders = sanitizeResponseData(config.headers);
1748
+ hasData = true;
1749
+ }
1729
1750
  }
1730
1751
  return hasData ? httpData : void 0;
1731
1752
  }