Skip to content
Snippets Groups Projects
Commit 885d0b54 authored by Ben Wheeler's avatar Ben Wheeler
Browse files

error can be object or string

parent 0d642de8
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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);
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment