diff --git a/bootstrap/src/errorResponses/j.html b/bootstrap/src/errorResponses/j.html deleted file mode 100644 index 491a663..0000000 --- a/bootstrap/src/errorResponses/j.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - SAS Job Execution - - - - - -
-
-
-
-
- -
Loading
- -
-
-
- -
-
-
-
- - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -"h54sError - at new h54sError (http://localhost:3000/static/js/main.chunk.js:1027:11) - at Object.error (http://localhost:3000/static/js/main.chunk.js:2124:16) - at XMLHttpRequest.request.onreadystatechange (http://localhost:3000/static/js/main.chunk.js:1512:25)" diff --git a/bootstrap/src/pages/home/examples.js b/bootstrap/src/pages/home/examples.js index fbd60be..a023447 100644 --- a/bootstrap/src/pages/home/examples.js +++ b/bootstrap/src/pages/home/examples.js @@ -60,6 +60,7 @@ export const getFolderDetailsExample = props => { + {props.state.getFolderDetailsError &&
{props.state.getFolderDetailsError}
} {props.state.folderDetails &&
Name: {props.state.folderDetails.name}
Id: {props.state.folderDetails.id}
diff --git a/bootstrap/src/pages/home/home.js b/bootstrap/src/pages/home/home.js index 9f48945..a3f63ab 100644 --- a/bootstrap/src/pages/home/home.js +++ b/bootstrap/src/pages/home/home.js @@ -36,7 +36,8 @@ class Home extends React.Component { filesContent: {}, editFile: null, editFileError: '', - updatingFile: false + updatingFile: false, + getFolderDetailsError: '' } fileContent = {"firstName": "George", "lastName": "Clooney"} @@ -65,11 +66,20 @@ class Home extends React.Component { } getFolderDetails = () => { + this.setState({getFolderDetailsError: ''}) this.props.getFolderDetails(config.metadataRoot, null) .then(res => { res.body.etag = res.headers['etag'] || res.headers.get('Etag'); this.setState({folderDetails: res.body}) - }) + }).catch(e => { + try { + const message = JSON.parse(e.message) + this.setState({getFolderDetailsError: message.message}) + } catch (er) { + console.log(er) + } + }) + } getRootFolderContent = () => {