diff --git a/src/containers/gui.jsx b/src/containers/gui.jsx index 6fd1b3be6a1f7c92b6d1ab4b39f3c35c4ecfacbf..459d6ad66ee2b4a0a36a1f80d1ec1a0efa2b4121 100644 --- a/src/containers/gui.jsx +++ b/src/containers/gui.jsx @@ -66,7 +66,7 @@ class GUI extends React.Component { render () { if (this.props.isError) { throw new Error( - `Failed to load project from server [id=${window.location.hash}]: ${this.props.error}`); + `Error in Scratch GUI [location=${window.location}]: ${this.props.error}`); } const { /* eslint-disable no-unused-vars */ @@ -101,7 +101,7 @@ class GUI extends React.Component { GUI.propTypes = { assetHost: PropTypes.string, children: PropTypes.node, - error: PropTypes.object, // eslint-disable-line react/forbid-prop-types + error: PropTypes.oneOfType([PropTypes.object, PropTypes.string]), fetchingProject: PropTypes.bool, hideIntro: PropTypes.bool, importInfoVisible: PropTypes.bool, diff --git a/src/lib/project-fetcher-hoc.jsx b/src/lib/project-fetcher-hoc.jsx index ab8325b5fff656d5233400cada9b31e9b9126501..ad2aecd17a6663605dfa9eace2b8c4e06a4fc717 100644 --- a/src/lib/project-fetcher-hoc.jsx +++ b/src/lib/project-fetcher-hoc.jsx @@ -75,7 +75,7 @@ const ProjectFetcherHOC = function (WrappedComponent) { } }) .catch(err => { - this.props.onError(`Saving the project failed with error: ${err}`); + this.props.onError(err); log.error(err); }); }