@atlaskit/media-picker 70.1.1 → 70.1.2

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,13 @@
1
1
  # @atlaskit/media-picker
2
2
 
3
+ ## 70.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`33c6d6aaeef68`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/33c6d6aaeef68) -
8
+ Use payload.error.description as fallback for errorDetail when rawError does not provide a message
9
+ in upload failure handling
10
+
3
11
  ## 70.1.1
4
12
 
5
13
  ### Patch Changes
@@ -114,7 +114,7 @@ var LocalUploadComponentReact = exports.LocalUploadComponentReact = /*#__PURE__*
114
114
  _end2 = (0, _perfMarks.end)("MediaPicker.fireUpload.".concat(fileId)), _end2$duration = _end2.duration, uploadDurationMsec = _end2$duration === void 0 ? -1 : _end2$duration;
115
115
  errorDetail = 'unknown';
116
116
  if ((0, _platformFeatureFlags.fg)('add_media_picker_error_detail')) {
117
- errorDetail = rawError && (0, _mediaClient.isCommonMediaClientError)(rawError) && (_rawError$innerError = rawError.innerError) !== null && _rawError$innerError !== void 0 && _rawError$innerError.message ? (_rawError$innerError2 = rawError.innerError) === null || _rawError$innerError2 === void 0 ? void 0 : _rawError$innerError2.message : rawError instanceof Error ? rawError.message : 'unknown';
117
+ errorDetail = rawError && (0, _mediaClient.isCommonMediaClientError)(rawError) && (_rawError$innerError = rawError.innerError) !== null && _rawError$innerError !== void 0 && _rawError$innerError.message ? (_rawError$innerError2 = rawError.innerError) === null || _rawError$innerError2 === void 0 ? void 0 : _rawError$innerError2.message : rawError instanceof Error ? rawError.message : payload.error.description;
118
118
  }
119
119
  requestMetadata = !!rawError ? (0, _analytics.getRequestMetadata)(rawError) : undefined;
120
120
  _this.createAndFireAnalyticsEvent({
@@ -9,7 +9,7 @@ var _mediaClient = require("@atlaskit/media-client");
9
9
  // Component name will be prefixed with "media-picker-" in logs. Check ufoExperiences in utils files
10
10
 
11
11
  var packageName = "@atlaskit/media-picker";
12
- var packageVersion = "70.1.0";
12
+ var packageVersion = "0.0.0-development";
13
13
  function getPackageAttributes(componentName) {
14
14
  return {
15
15
  packageName: packageName,
@@ -12,7 +12,7 @@ var _mediaClient = require("@atlaskit/media-client");
12
12
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
13
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
14
  var packageName = "@atlaskit/media-picker";
15
- var packageVersion = "70.1.0";
15
+ var packageVersion = "0.0.0-development";
16
16
  var ufoExperience;
17
17
  var initExperience = function initExperience(id, componentName) {
18
18
  if (!ufoExperience) {
@@ -106,7 +106,7 @@ export class LocalUploadComponentReact extends Component {
106
106
  let errorDetail = 'unknown';
107
107
  if (fg('add_media_picker_error_detail')) {
108
108
  var _rawError$innerError, _rawError$innerError2;
109
- errorDetail = rawError && isCommonMediaClientError(rawError) && (_rawError$innerError = rawError.innerError) !== null && _rawError$innerError !== void 0 && _rawError$innerError.message ? (_rawError$innerError2 = rawError.innerError) === null || _rawError$innerError2 === void 0 ? void 0 : _rawError$innerError2.message : rawError instanceof Error ? rawError.message : 'unknown';
109
+ errorDetail = rawError && isCommonMediaClientError(rawError) && (_rawError$innerError = rawError.innerError) !== null && _rawError$innerError !== void 0 && _rawError$innerError.message ? (_rawError$innerError2 = rawError.innerError) === null || _rawError$innerError2 === void 0 ? void 0 : _rawError$innerError2.message : rawError instanceof Error ? rawError.message : payload.error.description;
110
110
  }
111
111
  const requestMetadata = !!rawError ? getRequestMetadata(rawError) : undefined;
112
112
  this.createAndFireAnalyticsEvent({
@@ -3,7 +3,7 @@ import { isRequestError } from '@atlaskit/media-client';
3
3
  // Component name will be prefixed with "media-picker-" in logs. Check ufoExperiences in utils files
4
4
 
5
5
  const packageName = "@atlaskit/media-picker";
6
- const packageVersion = "70.1.0";
6
+ const packageVersion = "0.0.0-development";
7
7
  export function getPackageAttributes(componentName) {
8
8
  return {
9
9
  packageName,
@@ -2,7 +2,7 @@ import { ConcurrentExperience, ExperiencePerformanceTypes, ExperienceTypes } fro
2
2
  import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
3
3
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
4
4
  const packageName = "@atlaskit/media-picker";
5
- const packageVersion = "70.1.0";
5
+ const packageVersion = "0.0.0-development";
6
6
  let ufoExperience;
7
7
  const initExperience = (id, componentName) => {
8
8
  if (!ufoExperience) {
@@ -107,7 +107,7 @@ export var LocalUploadComponentReact = /*#__PURE__*/function (_Component) {
107
107
  _end2 = end("MediaPicker.fireUpload.".concat(fileId)), _end2$duration = _end2.duration, uploadDurationMsec = _end2$duration === void 0 ? -1 : _end2$duration;
108
108
  errorDetail = 'unknown';
109
109
  if (fg('add_media_picker_error_detail')) {
110
- errorDetail = rawError && isCommonMediaClientError(rawError) && (_rawError$innerError = rawError.innerError) !== null && _rawError$innerError !== void 0 && _rawError$innerError.message ? (_rawError$innerError2 = rawError.innerError) === null || _rawError$innerError2 === void 0 ? void 0 : _rawError$innerError2.message : rawError instanceof Error ? rawError.message : 'unknown';
110
+ errorDetail = rawError && isCommonMediaClientError(rawError) && (_rawError$innerError = rawError.innerError) !== null && _rawError$innerError !== void 0 && _rawError$innerError.message ? (_rawError$innerError2 = rawError.innerError) === null || _rawError$innerError2 === void 0 ? void 0 : _rawError$innerError2.message : rawError instanceof Error ? rawError.message : payload.error.description;
111
111
  }
112
112
  requestMetadata = !!rawError ? getRequestMetadata(rawError) : undefined;
113
113
  _this.createAndFireAnalyticsEvent({
@@ -3,7 +3,7 @@ import { isRequestError } from '@atlaskit/media-client';
3
3
  // Component name will be prefixed with "media-picker-" in logs. Check ufoExperiences in utils files
4
4
 
5
5
  var packageName = "@atlaskit/media-picker";
6
- var packageVersion = "70.1.0";
6
+ var packageVersion = "0.0.0-development";
7
7
  export function getPackageAttributes(componentName) {
8
8
  return {
9
9
  packageName: packageName,
@@ -5,7 +5,7 @@ import { ConcurrentExperience, ExperiencePerformanceTypes, ExperienceTypes } fro
5
5
  import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
6
6
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
7
7
  var packageName = "@atlaskit/media-picker";
8
- var packageVersion = "70.1.0";
8
+ var packageVersion = "0.0.0-development";
9
9
  var ufoExperience;
10
10
  var initExperience = function initExperience(id, componentName) {
11
11
  if (!ufoExperience) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-picker",
3
- "version": "70.1.1",
3
+ "version": "70.1.2",
4
4
  "description": "Library for handling file uploads",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"