@sentry/browser 6.17.0-beta.0 → 6.17.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.
Files changed (57) hide show
  1. package/build/bundle.es6.js +122 -119
  2. package/build/bundle.es6.js.map +1 -1
  3. package/build/bundle.es6.min.js +2 -2
  4. package/build/bundle.es6.min.js.map +1 -1
  5. package/build/bundle.js +123 -105
  6. package/build/bundle.js.map +1 -1
  7. package/build/bundle.min.js +2 -2
  8. package/build/bundle.min.js.map +1 -1
  9. package/dist/backend.d.ts +2 -2
  10. package/dist/backend.d.ts.map +1 -1
  11. package/dist/backend.js +2 -1
  12. package/dist/backend.js.map +1 -1
  13. package/dist/eventbuilder.d.ts +4 -4
  14. package/dist/eventbuilder.d.ts.map +1 -1
  15. package/dist/eventbuilder.js +8 -7
  16. package/dist/eventbuilder.js.map +1 -1
  17. package/dist/exports.d.ts +1 -1
  18. package/dist/exports.d.ts.map +1 -1
  19. package/dist/exports.js +2 -0
  20. package/dist/exports.js.map +1 -1
  21. package/dist/helpers.js.map +1 -1
  22. package/dist/integrations/breadcrumbs.d.ts.map +1 -1
  23. package/dist/integrations/breadcrumbs.js +2 -1
  24. package/dist/integrations/breadcrumbs.js.map +1 -1
  25. package/dist/integrations/globalhandlers.d.ts.map +1 -1
  26. package/dist/integrations/globalhandlers.js +4 -3
  27. package/dist/integrations/globalhandlers.js.map +1 -1
  28. package/dist/integrations/trycatch.js.map +1 -1
  29. package/dist/tracekit.d.ts.map +1 -1
  30. package/dist/tracekit.js.map +1 -1
  31. package/dist/transports/fetch.js +3 -3
  32. package/dist/transports/fetch.js.map +1 -1
  33. package/esm/backend.d.ts +2 -2
  34. package/esm/backend.d.ts.map +1 -1
  35. package/esm/backend.js +2 -1
  36. package/esm/backend.js.map +1 -1
  37. package/esm/eventbuilder.d.ts +4 -4
  38. package/esm/eventbuilder.d.ts.map +1 -1
  39. package/esm/eventbuilder.js +8 -7
  40. package/esm/eventbuilder.js.map +1 -1
  41. package/esm/exports.d.ts +1 -1
  42. package/esm/exports.d.ts.map +1 -1
  43. package/esm/exports.js +1 -0
  44. package/esm/exports.js.map +1 -1
  45. package/esm/helpers.js.map +1 -1
  46. package/esm/integrations/breadcrumbs.d.ts.map +1 -1
  47. package/esm/integrations/breadcrumbs.js +2 -1
  48. package/esm/integrations/breadcrumbs.js.map +1 -1
  49. package/esm/integrations/globalhandlers.d.ts.map +1 -1
  50. package/esm/integrations/globalhandlers.js +4 -3
  51. package/esm/integrations/globalhandlers.js.map +1 -1
  52. package/esm/integrations/trycatch.js.map +1 -1
  53. package/esm/tracekit.d.ts.map +1 -1
  54. package/esm/tracekit.js.map +1 -1
  55. package/esm/transports/fetch.js +3 -3
  56. package/esm/transports/fetch.js.map +1 -1
  57. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @sentry/browser 6.17.0-beta.0 (2a9a3d4) | https://github.com/getsentry/sentry-javascript */
1
+ /*! @sentry/browser 6.17.3 (42e245a) | https://github.com/getsentry/sentry-javascript */
2
2
  var Sentry = (function (exports) {
3
3
  /*! *****************************************************************************
4
4
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -40,16 +40,6 @@ var Sentry = (function (exports) {
40
40
  return __assign.apply(this, arguments);
41
41
  };
42
42
 
43
- function __rest(s, e) {
44
- var t = {};
45
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
46
- t[p] = s[p];
47
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
48
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
49
- t[p[i]] = s[p[i]];
50
- return t;
51
- }
52
-
53
43
  function __values(o) {
54
44
  var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
55
45
  if (m) return m.call(o);
@@ -84,6 +74,27 @@ var Sentry = (function (exports) {
84
74
  return ar;
85
75
  }
86
76
 
77
+ /**
78
+ * TODO(v7): Remove this enum and replace with SeverityLevel
79
+ */
80
+ (function (Severity) {
81
+ /** JSDoc */
82
+ Severity["Fatal"] = "fatal";
83
+ /** JSDoc */
84
+ Severity["Error"] = "error";
85
+ /** JSDoc */
86
+ Severity["Warning"] = "warning";
87
+ /** JSDoc */
88
+ Severity["Log"] = "log";
89
+ /** JSDoc */
90
+ Severity["Info"] = "info";
91
+ /** JSDoc */
92
+ Severity["Debug"] = "debug";
93
+ /** JSDoc */
94
+ Severity["Critical"] = "critical";
95
+ })(exports.Severity || (exports.Severity = {}));
96
+ var SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];
97
+
87
98
  /**
88
99
  * Consumes the promise and logs the error when it rejects.
89
100
  * @param promise A promise to forget.
@@ -235,7 +246,7 @@ var Sentry = (function (exports) {
235
246
  return isBuiltin(wat, 'String');
236
247
  }
237
248
  /**
238
- * Checks whether given value's is a primitive (undefined, null, number, boolean, string, bigint, symbol)
249
+ * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)
239
250
  * {@link isPrimitive}.
240
251
  *
241
252
  * @param wat A value to be checked.
@@ -483,7 +494,7 @@ var Sentry = (function (exports) {
483
494
  function dsnFromString(str) {
484
495
  var match = DSN_REGEX.exec(str);
485
496
  if (!match) {
486
- throw new SentryError('Invalid Dsn');
497
+ throw new SentryError("Invalid Sentry Dsn: " + str);
487
498
  }
488
499
  var _a = __read(match.slice(1), 6), protocol = _a[0], publicKey = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5];
489
500
  var path = '';
@@ -525,17 +536,17 @@ var Sentry = (function (exports) {
525
536
  var requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];
526
537
  requiredComponents.forEach(function (component) {
527
538
  if (!dsn[component]) {
528
- throw new SentryError("Invalid Dsn: " + component + " missing");
539
+ throw new SentryError("Invalid Sentry Dsn: " + component + " missing");
529
540
  }
530
541
  });
531
542
  if (!projectId.match(/^\d+$/)) {
532
- throw new SentryError("Invalid Dsn: Invalid projectId " + projectId);
543
+ throw new SentryError("Invalid Sentry Dsn: Invalid projectId " + projectId);
533
544
  }
534
545
  if (!isValidProtocol(protocol)) {
535
- throw new SentryError("Invalid Dsn: Invalid protocol " + protocol);
546
+ throw new SentryError("Invalid Sentry Dsn: Invalid protocol " + protocol);
536
547
  }
537
548
  if (port && isNaN(parseInt(port, 10))) {
538
- throw new SentryError("Invalid Dsn: Invalid port " + port);
549
+ throw new SentryError("Invalid Sentry Dsn: Invalid port " + port);
539
550
  }
540
551
  return true;
541
552
  }
@@ -999,7 +1010,7 @@ var Sentry = (function (exports) {
999
1010
  function walk(key, value, depth, memo) {
1000
1011
  if (depth === void 0) { depth = +Infinity; }
1001
1012
  if (memo === void 0) { memo = memoBuilder(); }
1002
- // If we reach the maximum depth, serialize whatever has left
1013
+ // If we reach the maximum depth, serialize whatever is left
1003
1014
  if (depth === 0) {
1004
1015
  return serializeValue(value);
1005
1016
  }
@@ -1009,12 +1020,13 @@ var Sentry = (function (exports) {
1009
1020
  return value.toJSON();
1010
1021
  }
1011
1022
  /* eslint-enable @typescript-eslint/no-unsafe-member-access */
1012
- // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further
1023
+ // If normalized value is a primitive, there are no branches left to walk, so bail out
1013
1024
  var normalized = normalizeValue(value, key);
1014
1025
  if (isPrimitive(normalized)) {
1015
1026
  return normalized;
1016
1027
  }
1017
- // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself
1028
+ // Create source that we will use for the next iteration. It will either be an objectified error object (`Error` type
1029
+ // with extracted key:value pairs) or the input itself.
1018
1030
  var source = getWalkSource(value);
1019
1031
  // Create an accumulator that will act as a parent for all future itterations of that branch
1020
1032
  var acc = Array.isArray(value) ? [] : {};
@@ -1191,9 +1203,9 @@ var Sentry = (function (exports) {
1191
1203
  * @returns Answer to the given question.
1192
1204
  */
1193
1205
  function supportsReferrerPolicy() {
1194
- // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default
1195
- // https://caniuse.com/#feat=referrer-policy
1196
- // It doesn't. And it throw exception instead of ignoring this parameter...
1206
+ // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'
1207
+ // (see https://caniuse.com/#feat=referrer-policy),
1208
+ // it doesn't. And it throws an exception instead of ignoring this parameter...
1197
1209
  // REF: https://github.com/getsentry/raven-js/issues/1233
1198
1210
  if (!supportsFetch()) {
1199
1211
  return false;
@@ -1397,9 +1409,6 @@ var Sentry = (function (exports) {
1397
1409
  if (!('XMLHttpRequest' in global$2)) {
1398
1410
  return;
1399
1411
  }
1400
- // Poor man's implementation of ES6 `Map`, tracking and keeping in sync key and value separately.
1401
- var requestKeys = [];
1402
- var requestValues = [];
1403
1412
  var xhrproto = XMLHttpRequest.prototype;
1404
1413
  fill(xhrproto, 'open', function (originalOpen) {
1405
1414
  return function () {
@@ -1430,20 +1439,6 @@ var Sentry = (function (exports) {
1430
1439
  catch (e) {
1431
1440
  /* do nothing */
1432
1441
  }
1433
- try {
1434
- var requestPos = requestKeys.indexOf(xhr);
1435
- if (requestPos !== -1) {
1436
- // Make sure to pop both key and value to keep it in sync.
1437
- requestKeys.splice(requestPos);
1438
- var args_1 = requestValues.splice(requestPos)[0];
1439
- if (args_1[0] !== undefined) {
1440
- xhrInfo.body = args_1[0];
1441
- }
1442
- }
1443
- }
1444
- catch (e) {
1445
- /* do nothing */
1446
- }
1447
1442
  triggerHandlers('xhr', {
1448
1443
  args: args,
1449
1444
  endTimestamp: Date.now(),
@@ -1476,8 +1471,9 @@ var Sentry = (function (exports) {
1476
1471
  for (var _i = 0; _i < arguments.length; _i++) {
1477
1472
  args[_i] = arguments[_i];
1478
1473
  }
1479
- requestKeys.push(this);
1480
- requestValues.push(args);
1474
+ if (this.__sentry_xhr__ && args[0] !== undefined) {
1475
+ this.__sentry_xhr__.body = args[0];
1476
+ }
1481
1477
  triggerHandlers('xhr', {
1482
1478
  args: args,
1483
1479
  startTimestamp: Date.now(),
@@ -2179,28 +2175,6 @@ var Sentry = (function (exports) {
2179
2175
  };
2180
2176
  }
2181
2177
 
2182
- /** JSDoc
2183
- * @deprecated Use string literals - if you require type casting, cast to SeverityLevel type
2184
- */
2185
- var Severity;
2186
- (function (Severity) {
2187
- /** JSDoc */
2188
- Severity["Fatal"] = "fatal";
2189
- /** JSDoc */
2190
- Severity["Error"] = "error";
2191
- /** JSDoc */
2192
- Severity["Warning"] = "warning";
2193
- /** JSDoc */
2194
- Severity["Log"] = "log";
2195
- /** JSDoc */
2196
- Severity["Info"] = "info";
2197
- /** JSDoc */
2198
- Severity["Debug"] = "debug";
2199
- /** JSDoc */
2200
- Severity["Critical"] = "critical";
2201
- })(Severity || (Severity = {}));
2202
- var SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];
2203
-
2204
2178
  function isSupportedSeverity(level) {
2205
2179
  return SeverityLevels.indexOf(level) !== -1;
2206
2180
  }
@@ -2212,11 +2186,11 @@ var Sentry = (function (exports) {
2212
2186
  */
2213
2187
  function severityFromString(level) {
2214
2188
  if (level === 'warn')
2215
- return 'warning';
2189
+ return exports.Severity.Warning;
2216
2190
  if (isSupportedSeverity(level)) {
2217
2191
  return level;
2218
2192
  }
2219
- return 'log';
2193
+ return exports.Severity.Log;
2220
2194
  }
2221
2195
 
2222
2196
  /**
@@ -2397,6 +2371,11 @@ var Sentry = (function (exports) {
2397
2371
  this._extra = {};
2398
2372
  /** Contexts */
2399
2373
  this._contexts = {};
2374
+ /**
2375
+ * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
2376
+ * sent to Sentry
2377
+ */
2378
+ this._sdkProcessingMetadata = {};
2400
2379
  }
2401
2380
  /**
2402
2381
  * Inherit values from the parent scope.
@@ -2562,18 +2541,10 @@ var Sentry = (function (exports) {
2562
2541
  * @inheritDoc
2563
2542
  */
2564
2543
  Scope.prototype.getTransaction = function () {
2565
- // often, this span will be a transaction, but it's not guaranteed to be
2544
+ // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will
2545
+ // have a pointer to the currently-active transaction.
2566
2546
  var span = this.getSpan();
2567
- // try it the new way first
2568
- if (span && span.transaction) {
2569
- return span.transaction;
2570
- }
2571
- // fallback to the old way (known bug: this only finds transactions with sampled = true)
2572
- if (span && span.spanRecorder && span.spanRecorder.spans[0]) {
2573
- return span.spanRecorder.spans[0];
2574
- }
2575
- // neither way found a transaction
2576
- return undefined;
2547
+ return span && span.transaction;
2577
2548
  };
2578
2549
  /**
2579
2550
  * @inheritDoc
@@ -2723,8 +2694,16 @@ var Sentry = (function (exports) {
2723
2694
  this._applyFingerprint(event);
2724
2695
  event.breadcrumbs = __spread((event.breadcrumbs || []), this._breadcrumbs);
2725
2696
  event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;
2697
+ event.sdkProcessingMetadata = this._sdkProcessingMetadata;
2726
2698
  return this._notifyEventProcessors(__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint);
2727
2699
  };
2700
+ /**
2701
+ * Add data which will be accessible during event processing but won't get sent to Sentry
2702
+ */
2703
+ Scope.prototype.setSDKProcessingMetadata = function (newData) {
2704
+ this._sdkProcessingMetadata = __assign(__assign({}, this._sdkProcessingMetadata), newData);
2705
+ return this;
2706
+ };
2728
2707
  /**
2729
2708
  * This will be called after {@link applyToEvent} is finished.
2730
2709
  */
@@ -3468,7 +3447,7 @@ var Sentry = (function (exports) {
3468
3447
  * Captures a message event and sends it to Sentry.
3469
3448
  *
3470
3449
  * @param message The message to send to Sentry.
3471
- * @param SeverityLevel Define the level of the message.
3450
+ * @param Severity Define the level of the message.
3472
3451
  * @returns The generated eventId.
3473
3452
  */
3474
3453
  function captureMessage(message, captureContext) {
@@ -4079,10 +4058,7 @@ var Sentry = (function (exports) {
4079
4058
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
4080
4059
  normalized.contexts.trace = event.contexts.trace;
4081
4060
  }
4082
- var _a = this.getOptions()._experiments, _experiments = _a === void 0 ? {} : _a;
4083
- if (_experiments.ensureNoCircularStructures) {
4084
- return normalize(normalized);
4085
- }
4061
+ event.sdkProcessingMetadata = __assign(__assign({}, event.sdkProcessingMetadata), { baseClientNormalized: true });
4086
4062
  return normalized;
4087
4063
  };
4088
4064
  /**
@@ -4388,16 +4364,58 @@ var Sentry = (function (exports) {
4388
4364
  var sdkInfo = getSdkMetadataForEnvelopeHeader(api);
4389
4365
  var eventType = event.type || 'event';
4390
4366
  var useEnvelope = eventType === 'transaction' || !!api.tunnel;
4391
- var _a = event.debug_meta || {}, transactionSampling = _a.transactionSampling, metadata = __rest(_a, ["transactionSampling"]);
4392
- var _b = transactionSampling || {}, samplingMethod = _b.method, sampleRate = _b.rate;
4393
- if (Object.keys(metadata).length === 0) {
4394
- delete event.debug_meta;
4367
+ var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;
4368
+ var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;
4369
+ // TODO: Below is a temporary hack in order to debug a serialization error - see
4370
+ // https://github.com/getsentry/sentry-javascript/issues/2809 and
4371
+ // https://github.com/getsentry/sentry-javascript/pull/4425. TL;DR: even though we normalize all events (which should
4372
+ // prevent this), something is causing `JSON.stringify` to throw a circular reference error.
4373
+ //
4374
+ // When it's time to remove it:
4375
+ // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting
4376
+ // `sdkProcessingMetadata`
4377
+ // 2. Restore the original version of the request body, which is commented out
4378
+ // 3. Search for `skippedNormalization` and pull out the companion hack in the browser playwright tests
4379
+ enhanceEventWithSdkInfo(event, api.metadata.sdk);
4380
+ event.tags = event.tags || {};
4381
+ event.extra = event.extra || {};
4382
+ // In theory, all events should be marked as having gone through normalization and so
4383
+ // we should never set this tag
4384
+ if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {
4385
+ event.tags.skippedNormalization = true;
4386
+ }
4387
+ // prevent this data from being sent to sentry
4388
+ // TODO: This is NOT part of the hack - DO NOT DELETE
4389
+ delete event.sdkProcessingMetadata;
4390
+ var body;
4391
+ try {
4392
+ // 99.9% of events should get through just fine - no change in behavior for them
4393
+ body = JSON.stringify(event);
4395
4394
  }
4396
- else {
4397
- event.debug_meta = metadata;
4395
+ catch (err) {
4396
+ // Record data about the error without replacing original event data, then force renormalization
4397
+ event.tags.JSONStringifyError = true;
4398
+ event.extra.JSONStringifyError = err;
4399
+ try {
4400
+ body = JSON.stringify(normalize(event));
4401
+ }
4402
+ catch (newErr) {
4403
+ // At this point even renormalization hasn't worked, meaning something about the event data has gone very wrong.
4404
+ // Time to cut our losses and record only the new error. With luck, even in the problematic cases we're trying to
4405
+ // debug with this hack, we won't ever land here.
4406
+ var innerErr = newErr;
4407
+ body = JSON.stringify({
4408
+ message: 'JSON.stringify error after renormalization',
4409
+ // setting `extra: { innerErr }` here for some reason results in an empty object, so unpack manually
4410
+ extra: { message: innerErr.message, stack: innerErr.stack },
4411
+ });
4412
+ }
4398
4413
  }
4399
4414
  var req = {
4400
- body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),
4415
+ // this is the relevant line of code before the hack was added, to make it easy to undo said hack once we've solved
4416
+ // the mystery
4417
+ // body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),
4418
+ body: body,
4401
4419
  type: eventType,
4402
4420
  url: useEnvelope
4403
4421
  ? getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel)
@@ -4446,7 +4464,7 @@ var Sentry = (function (exports) {
4446
4464
  hub.bindClient(client);
4447
4465
  }
4448
4466
 
4449
- var SDK_VERSION = '6.17.0-beta.0';
4467
+ var SDK_VERSION = '6.17.3';
4450
4468
 
4451
4469
  var originalFunctionToString;
4452
4470
  /** Patch toString calls to return proper name for wrapped functions */
@@ -5014,7 +5032,7 @@ var Sentry = (function (exports) {
5014
5032
  }
5015
5033
 
5016
5034
  /**
5017
- * Builds and Event from a Exception
5035
+ * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
5018
5036
  * @hidden
5019
5037
  */
5020
5038
  function eventFromException(options, exception, hint) {
@@ -5023,7 +5041,7 @@ var Sentry = (function (exports) {
5023
5041
  attachStacktrace: options.attachStacktrace,
5024
5042
  });
5025
5043
  addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }
5026
- event.level = 'error';
5044
+ event.level = exports.Severity.Error;
5027
5045
  if (hint && hint.event_id) {
5028
5046
  event.event_id = hint.event_id;
5029
5047
  }
@@ -5034,7 +5052,7 @@ var Sentry = (function (exports) {
5034
5052
  * @hidden
5035
5053
  */
5036
5054
  function eventFromMessage(options, message, level, hint) {
5037
- if (level === void 0) { level = 'info'; }
5055
+ if (level === void 0) { level = exports.Severity.Info; }
5038
5056
  var syntheticException = (hint && hint.syntheticException) || undefined;
5039
5057
  var event = eventFromString(message, syntheticException, {
5040
5058
  attachStacktrace: options.attachStacktrace,
@@ -5088,11 +5106,11 @@ var Sentry = (function (exports) {
5088
5106
  return event;
5089
5107
  }
5090
5108
  if (isPlainObject(exception) || isEvent(exception)) {
5091
- // If it is plain Object or Event, serialize it manually and extract options
5092
- // This will allow us to group events based on top-level keys
5093
- // which is much better than creating new group when any key/value change
5109
+ // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize
5110
+ // it manually. This will allow us to group events based on top-level keys which is much better than creating a new
5111
+ // group on any key/value change.
5094
5112
  var objectException = exception;
5095
- event = eventFromPlainObject(objectException, syntheticException, options.rejection);
5113
+ event = eventFromPlainObject(objectException, syntheticException, options.isRejection);
5096
5114
  addExceptionMechanism(event, {
5097
5115
  synthetic: true,
5098
5116
  });
@@ -5448,9 +5466,9 @@ var Sentry = (function (exports) {
5448
5466
  var options = {
5449
5467
  body: sentryRequest.body,
5450
5468
  method: 'POST',
5451
- // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default
5452
- // https://caniuse.com/#feat=referrer-policy
5453
- // It doesn't. And it throw exception instead of ignoring this parameter...
5469
+ // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'
5470
+ // (see https://caniuse.com/#feat=referrer-policy),
5471
+ // it doesn't. And it throws an exception instead of ignoring this parameter...
5454
5472
  // REF: https://github.com/getsentry/raven-js/issues/1233
5455
5473
  referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''),
5456
5474
  };
@@ -5579,7 +5597,7 @@ var Sentry = (function (exports) {
5579
5597
  * @inheritDoc
5580
5598
  */
5581
5599
  BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {
5582
- if (level === void 0) { level = 'info'; }
5600
+ if (level === void 0) { level = exports.Severity.Info; }
5583
5601
  return eventFromMessage(this._options, message, level, hint);
5584
5602
  };
5585
5603
  /**
@@ -5812,7 +5830,7 @@ var Sentry = (function (exports) {
5812
5830
  ? _eventFromIncompleteOnError(msg, url, line, column)
5813
5831
  : _enhanceEventWithInitialFrame(eventFromUnknownInput(error || msg, undefined, {
5814
5832
  attachStacktrace: attachStacktrace,
5815
- rejection: false,
5833
+ isRejection: false,
5816
5834
  }), url, line, column);
5817
5835
  addMechanismAndCapture(hub, error, event, 'onerror');
5818
5836
  });
@@ -5853,9 +5871,9 @@ var Sentry = (function (exports) {
5853
5871
  ? _eventFromRejectionWithPrimitive(error)
5854
5872
  : eventFromUnknownInput(error, undefined, {
5855
5873
  attachStacktrace: attachStacktrace,
5856
- rejection: true,
5874
+ isRejection: true,
5857
5875
  });
5858
- event.level = 'error';
5876
+ event.level = exports.Severity.Error;
5859
5877
  addMechanismAndCapture(hub, error, event, 'onunhandledrejection');
5860
5878
  return;
5861
5879
  });
@@ -6351,7 +6369,7 @@ var Sentry = (function (exports) {
6351
6369
  getCurrentHub().addBreadcrumb({
6352
6370
  category: 'fetch',
6353
6371
  data: handlerData.fetchData,
6354
- level: 'error',
6372
+ level: exports.Severity.Error,
6355
6373
  type: 'http',
6356
6374
  }, {
6357
6375
  data: handlerData.error,