@imposium-hub/components 1.36.0 → 1.36.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.
|
@@ -86,10 +86,13 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
public componentWillUnmount() {
|
|
89
|
+
const {api, onError} = this.props;
|
|
90
|
+
const {experienceId} = this.state;
|
|
89
91
|
|
|
90
92
|
this.timer.stop();
|
|
91
93
|
|
|
92
94
|
this.evtHandlers.gotExperience = null;
|
|
95
|
+
api.cancelExperiencePolling();
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
private getInventoryOptions() {
|
|
@@ -476,8 +479,13 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
476
479
|
|
|
477
480
|
}).catch((e) => {
|
|
478
481
|
this.resetState();
|
|
482
|
+
const {data, status} = e.response;
|
|
479
483
|
if (onError) {
|
|
480
|
-
|
|
484
|
+
if (data && data.error) {
|
|
485
|
+
onError(`${copy.createExpError}: ${data.error}`);
|
|
486
|
+
} else {
|
|
487
|
+
onError(`${copy.createExpError}: ${e}`);
|
|
488
|
+
}
|
|
481
489
|
}
|
|
482
490
|
});
|
|
483
491
|
});
|