@atlaskit/profilecard 17.2.6 → 17.2.7
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 +6 -0
- package/dist/cjs/client/errorUtils.js +3 -1
- package/dist/cjs/client/graphqlUtils.js +4 -2
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/client/errorUtils.js +3 -1
- package/dist/es2019/client/graphqlUtils.js +4 -2
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/client/errorUtils.js +3 -1
- package/dist/esm/client/graphqlUtils.js +4 -2
- package/dist/esm/util/analytics.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 17.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7bb86e9484c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7bb86e9484c) - Transform errors from AGG and ignore 403(TEAMS_FORBIDDEN) and 410(TEAMS_TEAM_DELETED) errors for SLO failure
|
|
8
|
+
|
|
3
9
|
## 17.2.6
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getErrorAttributes = void 0;
|
|
7
|
-
var IGNORED_ERRORS = [
|
|
7
|
+
var IGNORED_ERRORS = [// Error categories from pf-directory
|
|
8
|
+
'NotPermitted', 'Gone', // Error categories from AGG
|
|
9
|
+
'TEAMS_FORBIDDEN', 'TEAMS_TEAM_DELETED'];
|
|
8
10
|
|
|
9
11
|
function isIgnoredError(error) {
|
|
10
12
|
return !!error && IGNORED_ERRORS.includes(error.reason);
|
|
@@ -43,10 +43,12 @@ function graphqlQuery(serviceUrl, query) {
|
|
|
43
43
|
return response.json();
|
|
44
44
|
}).then(function (json) {
|
|
45
45
|
if (json.errors) {
|
|
46
|
-
var _json$errors
|
|
46
|
+
var _json$errors$, _json$errors$2, _json$errors$2$extens, _json$errors$3, _json$errors$3$extens;
|
|
47
47
|
|
|
48
|
+
// We need to handle responses from pf-directory and AGG
|
|
48
49
|
return Promise.reject({
|
|
49
|
-
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || 'default'
|
|
50
|
+
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || ((_json$errors$2 = json.errors[0]) === null || _json$errors$2 === void 0 ? void 0 : (_json$errors$2$extens = _json$errors$2.extensions) === null || _json$errors$2$extens === void 0 ? void 0 : _json$errors$2$extens.classification) || 'default',
|
|
51
|
+
code: (_json$errors$3 = json.errors[0]) === null || _json$errors$3 === void 0 ? void 0 : (_json$errors$3$extens = _json$errors$3.extensions) === null || _json$errors$3$extens === void 0 ? void 0 : _json$errors$3$extens.statusCode
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
|
|
@@ -59,7 +59,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
59
59
|
actionSubjectId: actionSubjectId,
|
|
60
60
|
attributes: _objectSpread(_objectSpread({
|
|
61
61
|
packageName: "@atlaskit/profilecard",
|
|
62
|
-
packageVersion: "17.2.
|
|
62
|
+
packageVersion: "17.2.7"
|
|
63
63
|
}, attributes), {}, {
|
|
64
64
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
65
65
|
})
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
const IGNORED_ERRORS = [
|
|
1
|
+
const IGNORED_ERRORS = [// Error categories from pf-directory
|
|
2
|
+
'NotPermitted', 'Gone', // Error categories from AGG
|
|
3
|
+
'TEAMS_FORBIDDEN', 'TEAMS_TEAM_DELETED'];
|
|
2
4
|
|
|
3
5
|
function isIgnoredError(error) {
|
|
4
6
|
return !!error && IGNORED_ERRORS.includes(error.reason);
|
|
@@ -31,10 +31,12 @@ export function graphqlQuery(serviceUrl, query, processHeaders = id) {
|
|
|
31
31
|
return response;
|
|
32
32
|
}).then(response => response.json()).then(json => {
|
|
33
33
|
if (json.errors) {
|
|
34
|
-
var _json$errors
|
|
34
|
+
var _json$errors$, _json$errors$2, _json$errors$2$extens, _json$errors$3, _json$errors$3$extens;
|
|
35
35
|
|
|
36
|
+
// We need to handle responses from pf-directory and AGG
|
|
36
37
|
return Promise.reject({
|
|
37
|
-
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || 'default'
|
|
38
|
+
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || ((_json$errors$2 = json.errors[0]) === null || _json$errors$2 === void 0 ? void 0 : (_json$errors$2$extens = _json$errors$2.extensions) === null || _json$errors$2$extens === void 0 ? void 0 : _json$errors$2$extens.classification) || 'default',
|
|
39
|
+
code: (_json$errors$3 = json.errors[0]) === null || _json$errors$3 === void 0 ? void 0 : (_json$errors$3$extens = _json$errors$3.extensions) === null || _json$errors$3$extens === void 0 ? void 0 : _json$errors$3$extens.statusCode
|
|
38
40
|
});
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -38,7 +38,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
38
38
|
actionSubjectId,
|
|
39
39
|
attributes: {
|
|
40
40
|
packageName: "@atlaskit/profilecard",
|
|
41
|
-
packageVersion: "17.2.
|
|
41
|
+
packageVersion: "17.2.7",
|
|
42
42
|
...attributes,
|
|
43
43
|
firedAt: Math.round(getPageTime())
|
|
44
44
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
var IGNORED_ERRORS = [
|
|
1
|
+
var IGNORED_ERRORS = [// Error categories from pf-directory
|
|
2
|
+
'NotPermitted', 'Gone', // Error categories from AGG
|
|
3
|
+
'TEAMS_FORBIDDEN', 'TEAMS_TEAM_DELETED'];
|
|
2
4
|
|
|
3
5
|
function isIgnoredError(error) {
|
|
4
6
|
return !!error && IGNORED_ERRORS.includes(error.reason);
|
|
@@ -36,10 +36,12 @@ export function graphqlQuery(serviceUrl, query) {
|
|
|
36
36
|
return response.json();
|
|
37
37
|
}).then(function (json) {
|
|
38
38
|
if (json.errors) {
|
|
39
|
-
var _json$errors
|
|
39
|
+
var _json$errors$, _json$errors$2, _json$errors$2$extens, _json$errors$3, _json$errors$3$extens;
|
|
40
40
|
|
|
41
|
+
// We need to handle responses from pf-directory and AGG
|
|
41
42
|
return Promise.reject({
|
|
42
|
-
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || 'default'
|
|
43
|
+
reason: ((_json$errors$ = json.errors[0]) === null || _json$errors$ === void 0 ? void 0 : _json$errors$.category) || ((_json$errors$2 = json.errors[0]) === null || _json$errors$2 === void 0 ? void 0 : (_json$errors$2$extens = _json$errors$2.extensions) === null || _json$errors$2$extens === void 0 ? void 0 : _json$errors$2$extens.classification) || 'default',
|
|
44
|
+
code: (_json$errors$3 = json.errors[0]) === null || _json$errors$3 === void 0 ? void 0 : (_json$errors$3$extens = _json$errors$3.extensions) === null || _json$errors$3$extens === void 0 ? void 0 : _json$errors$3$extens.statusCode
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
|
|
@@ -48,7 +48,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
48
48
|
actionSubjectId: actionSubjectId,
|
|
49
49
|
attributes: _objectSpread(_objectSpread({
|
|
50
50
|
packageName: "@atlaskit/profilecard",
|
|
51
|
-
packageVersion: "17.2.
|
|
51
|
+
packageVersion: "17.2.7"
|
|
52
52
|
}, attributes), {}, {
|
|
53
53
|
firedAt: Math.round(getPageTime())
|
|
54
54
|
})
|
package/dist/esm/version.json
CHANGED