@atlaskit/profilecard 16.4.4 → 16.4.5

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 16.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`18ab5ef3325`](https://bitbucket.org/atlassian/atlassian-frontend/commits/18ab5ef3325) - Filter out certain types of failures for team profilecard data fetch
8
+
3
9
  ## 16.4.4
4
10
 
5
11
  ### Patch Changes
@@ -43,6 +43,12 @@ var buildTeamQuery = function buildTeamQuery(teamId, orgId) {
43
43
  };
44
44
  };
45
45
 
46
+ var IGNORED_ERRORS = ['NotPermitted', 'Gone'];
47
+
48
+ function isRealError(error) {
49
+ return !IGNORED_ERRORS.includes(error.reason);
50
+ }
51
+
46
52
  var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
47
53
  (0, _inherits2.default)(TeamProfileCardClient, _CachingClient);
48
54
 
@@ -116,7 +122,7 @@ var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
116
122
 
117
123
  resolve(data);
118
124
  }).catch(function (error) {
119
- if (analytics) {
125
+ if (analytics && isRealError(error)) {
120
126
  analytics((0, _analytics.teamRequestAnalytics)('failed', {
121
127
  duration: (0, _performance.getPageTime)() - startTime,
122
128
  errorStatus: error.code,
@@ -56,7 +56,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
56
56
  actionSubjectId: actionSubjectId,
57
57
  attributes: _objectSpread(_objectSpread({
58
58
  packageName: "@atlaskit/profilecard",
59
- packageVersion: "16.4.4"
59
+ packageVersion: "16.4.5"
60
60
  }, attributes), {}, {
61
61
  firedAt: (0, _performance.getPageTime)()
62
62
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.4.4"
3
+ "version": "16.4.5"
4
4
  }
@@ -28,6 +28,12 @@ const buildTeamQuery = (teamId, orgId) => ({
28
28
  }
29
29
  });
30
30
 
31
+ const IGNORED_ERRORS = ['NotPermitted', 'Gone'];
32
+
33
+ function isRealError(error) {
34
+ return !IGNORED_ERRORS.includes(error.reason);
35
+ }
36
+
31
37
  export default class TeamProfileCardClient extends CachingClient {
32
38
  constructor(options) {
33
39
  super(options);
@@ -85,7 +91,7 @@ export default class TeamProfileCardClient extends CachingClient {
85
91
 
86
92
  resolve(data);
87
93
  }).catch(error => {
88
- if (analytics) {
94
+ if (analytics && isRealError(error)) {
89
95
  analytics(teamRequestAnalytics('failed', {
90
96
  duration: getPageTime() - startTime,
91
97
  errorStatus: error.code,
@@ -35,7 +35,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
35
35
  actionSubjectId,
36
36
  attributes: {
37
37
  packageName: "@atlaskit/profilecard",
38
- packageVersion: "16.4.4",
38
+ packageVersion: "16.4.5",
39
39
  ...attributes,
40
40
  firedAt: getPageTime()
41
41
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.4.4"
3
+ "version": "16.4.5"
4
4
  }
@@ -25,6 +25,12 @@ var buildTeamQuery = function buildTeamQuery(teamId, orgId) {
25
25
  };
26
26
  };
27
27
 
28
+ var IGNORED_ERRORS = ['NotPermitted', 'Gone'];
29
+
30
+ function isRealError(error) {
31
+ return !IGNORED_ERRORS.includes(error.reason);
32
+ }
33
+
28
34
  var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
29
35
  _inherits(TeamProfileCardClient, _CachingClient);
30
36
 
@@ -99,7 +105,7 @@ var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
99
105
 
100
106
  resolve(data);
101
107
  }).catch(function (error) {
102
- if (analytics) {
108
+ if (analytics && isRealError(error)) {
103
109
  analytics(teamRequestAnalytics('failed', {
104
110
  duration: getPageTime() - startTime,
105
111
  errorStatus: error.code,
@@ -45,7 +45,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
45
45
  actionSubjectId: actionSubjectId,
46
46
  attributes: _objectSpread(_objectSpread({
47
47
  packageName: "@atlaskit/profilecard",
48
- packageVersion: "16.4.4"
48
+ packageVersion: "16.4.5"
49
49
  }, attributes), {}, {
50
50
  firedAt: getPageTime()
51
51
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.4.4"
3
+ "version": "16.4.5"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.4.4",
3
+ "version": "16.4.5",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"