@djust-b2b/djust-front-sdk 1.21.7 → 1.21.9

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.
@@ -37,7 +37,7 @@ exports.enhancedFetch = exports.updateConfiguration = exports.initialize = void
37
37
  const qs = __importStar(require("query-string"));
38
38
  const Sentry = __importStar(require("@sentry/browser"));
39
39
  require("isomorphic-fetch");
40
- const SDK_VERSION = require("../package.json").version;
40
+ const SDK_VERSION = require("../../package.json").version || "unknown";
41
41
  let clientConfig = {
42
42
  baseUrl: "",
43
43
  clientId: "",
@@ -59,11 +59,20 @@ const initialize = (initConfig) => {
59
59
  integrations: [
60
60
  Sentry.browserTracingIntegration(),
61
61
  Sentry.replayIntegration(),
62
+ Sentry.httpClientIntegration(),
63
+ Sentry.browserApiErrorsIntegration({
64
+ setTimeout: true,
65
+ setInterval: true,
66
+ requestAnimationFrame: true,
67
+ XMLHttpRequest: true,
68
+ eventTarget: true,
69
+ }),
62
70
  ],
63
71
  tracesSampleRate: 1.0,
64
72
  replaysSessionSampleRate: 0.1,
65
73
  replaysOnErrorSampleRate: 1.0,
66
74
  profilesSampleRate: 1.0,
75
+ sendDefaultPii: true,
67
76
  });
68
77
  console.log(`[Djust SDK] Sentry initialized in ${clientConfig.clientName || "unknown"} environment: ${clientConfig.env || "unknown"}.`);
69
78
  }
@@ -162,7 +171,7 @@ const enhancedFetch = async ({ path, method, params = {}, body, }) => {
162
171
  extra: {
163
172
  url: fullPath,
164
173
  method,
165
- response: errorMessage,
174
+ response: response,
166
175
  status: response.status,
167
176
  env: clientConfig.env,
168
177
  headers: (() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djust-b2b/djust-front-sdk",
3
- "version": "1.21.7",
3
+ "version": "1.21.9",
4
4
  "description": "DJUST Front SDK is a versatile JavaScript Software Development Kit (SDK) ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",