@atlaskit/react-ufo 5.6.1 → 5.7.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/CHANGELOG.md +7 -0
- package/dist/cjs/set-terminal-error/index.js +2 -2
- package/dist/es2019/set-terminal-error/index.js +2 -2
- package/dist/esm/set-terminal-error/index.js +2 -2
- package/dist/types/set-terminal-error/index.d.ts +1 -1
- package/dist/types-ts4.5/set-terminal-error/index.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 5.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b516e549d5e91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b516e549d5e91) -
|
|
8
|
+
Allows statusCode to be provided for terminal error metric
|
|
9
|
+
|
|
3
10
|
## 5.6.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -50,7 +50,7 @@ var getErrorTraceId = function getErrorTraceId(error) {
|
|
|
50
50
|
return isErrorObject(error) && 'traceId' in error && typeof error.traceId === 'string' ? error.traceId : undefined;
|
|
51
51
|
};
|
|
52
52
|
function setTerminalError(error, additionalAttributes, labelStack) {
|
|
53
|
-
var _error$message, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
53
|
+
var _error$message, _additionalAttributes, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
54
54
|
if (additionalAttributes !== null && additionalAttributes !== void 0 && additionalAttributes.isClientNetworkError) {
|
|
55
55
|
// Exclude client network errors from being reported to UFO
|
|
56
56
|
return;
|
|
@@ -63,7 +63,7 @@ function setTerminalError(error, additionalAttributes, labelStack) {
|
|
|
63
63
|
timestamp: currentTime
|
|
64
64
|
};
|
|
65
65
|
var errorData = (0, _platformFeatureFlags.fg)('platform_ufo_terminal_errors_fix_missing_data') ? _objectSpread(_objectSpread({}, baseErrorData), {}, {
|
|
66
|
-
statusCode: getErrorStatusCode(error),
|
|
66
|
+
statusCode: (_additionalAttributes = additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.statusCode) !== null && _additionalAttributes !== void 0 ? _additionalAttributes : getErrorStatusCode(error),
|
|
67
67
|
// Fallback to traceId from error object if it exists (e.g. FetchError)
|
|
68
68
|
traceId: (_getActiveTrace$trace = (_getActiveTrace = (0, _experienceTraceIdContext.getActiveTrace)()) === null || _getActiveTrace === void 0 ? void 0 : _getActiveTrace.traceId) !== null && _getActiveTrace$trace !== void 0 ? _getActiveTrace$trace : getErrorTraceId(error),
|
|
69
69
|
teamName: additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.teamName,
|
|
@@ -30,7 +30,7 @@ const getErrorStatusCode = error => {
|
|
|
30
30
|
};
|
|
31
31
|
const getErrorTraceId = error => isErrorObject(error) && 'traceId' in error && typeof error.traceId === 'string' ? error.traceId : undefined;
|
|
32
32
|
export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
33
|
-
var _error$message, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
33
|
+
var _error$message, _additionalAttributes, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
34
34
|
if (additionalAttributes !== null && additionalAttributes !== void 0 && additionalAttributes.isClientNetworkError) {
|
|
35
35
|
// Exclude client network errors from being reported to UFO
|
|
36
36
|
return;
|
|
@@ -44,7 +44,7 @@ export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
|
44
44
|
};
|
|
45
45
|
const errorData = fg('platform_ufo_terminal_errors_fix_missing_data') ? {
|
|
46
46
|
...baseErrorData,
|
|
47
|
-
statusCode: getErrorStatusCode(error),
|
|
47
|
+
statusCode: (_additionalAttributes = additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.statusCode) !== null && _additionalAttributes !== void 0 ? _additionalAttributes : getErrorStatusCode(error),
|
|
48
48
|
// Fallback to traceId from error object if it exists (e.g. FetchError)
|
|
49
49
|
traceId: (_getActiveTrace$trace = (_getActiveTrace = getActiveTrace()) === null || _getActiveTrace === void 0 ? void 0 : _getActiveTrace.traceId) !== null && _getActiveTrace$trace !== void 0 ? _getActiveTrace$trace : getErrorTraceId(error),
|
|
50
50
|
teamName: additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.teamName,
|
|
@@ -40,7 +40,7 @@ var getErrorTraceId = function getErrorTraceId(error) {
|
|
|
40
40
|
return isErrorObject(error) && 'traceId' in error && typeof error.traceId === 'string' ? error.traceId : undefined;
|
|
41
41
|
};
|
|
42
42
|
export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
43
|
-
var _error$message, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
43
|
+
var _error$message, _additionalAttributes, _getActiveTrace$trace, _getActiveTrace, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
44
44
|
if (additionalAttributes !== null && additionalAttributes !== void 0 && additionalAttributes.isClientNetworkError) {
|
|
45
45
|
// Exclude client network errors from being reported to UFO
|
|
46
46
|
return;
|
|
@@ -53,7 +53,7 @@ export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
|
53
53
|
timestamp: currentTime
|
|
54
54
|
};
|
|
55
55
|
var errorData = fg('platform_ufo_terminal_errors_fix_missing_data') ? _objectSpread(_objectSpread({}, baseErrorData), {}, {
|
|
56
|
-
statusCode: getErrorStatusCode(error),
|
|
56
|
+
statusCode: (_additionalAttributes = additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.statusCode) !== null && _additionalAttributes !== void 0 ? _additionalAttributes : getErrorStatusCode(error),
|
|
57
57
|
// Fallback to traceId from error object if it exists (e.g. FetchError)
|
|
58
58
|
traceId: (_getActiveTrace$trace = (_getActiveTrace = getActiveTrace()) === null || _getActiveTrace === void 0 ? void 0 : _getActiveTrace.traceId) !== null && _getActiveTrace$trace !== void 0 ? _getActiveTrace$trace : getErrorTraceId(error),
|
|
59
59
|
teamName: additionalAttributes === null || additionalAttributes === void 0 ? void 0 : additionalAttributes.teamName,
|
|
@@ -6,8 +6,8 @@ export interface TerminalErrorAdditionalAttributes {
|
|
|
6
6
|
errorHash?: string;
|
|
7
7
|
fallbackType?: 'page' | 'flag' | 'custom';
|
|
8
8
|
isClientNetworkError?: boolean;
|
|
9
|
-
traceId?: string;
|
|
10
9
|
statusCode?: number;
|
|
10
|
+
traceId?: string;
|
|
11
11
|
}
|
|
12
12
|
export interface TerminalErrorData extends TerminalErrorAdditionalAttributes {
|
|
13
13
|
errorType: string;
|
|
@@ -6,8 +6,8 @@ export interface TerminalErrorAdditionalAttributes {
|
|
|
6
6
|
errorHash?: string;
|
|
7
7
|
fallbackType?: 'page' | 'flag' | 'custom';
|
|
8
8
|
isClientNetworkError?: boolean;
|
|
9
|
-
traceId?: string;
|
|
10
9
|
statusCode?: number;
|
|
10
|
+
traceId?: string;
|
|
11
11
|
}
|
|
12
12
|
export interface TerminalErrorData extends TerminalErrorAdditionalAttributes {
|
|
13
13
|
errorType: string;
|