Fix error handler in Playbooks page

error.status doesn't exists, the object we need to check in case of an error is error.response

Change-Id: If56f4df2ed412c15c04864bb95ba0c671f338fef
This commit is contained in:
Guillaume Vincent 2019-05-29 15:11:30 +02:00
parent acadff27db
commit 41c073b8fd
1 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,7 @@ export class PlaybooksContainer extends Component {
getPlaybooks()
.catch(error => {
let errorMessage = "";
if (error.status) {
if (error.response) {
errorMessage = error.message;
} else {
errorMessage = `Server located at ${
@ -83,7 +83,8 @@ export class PlaybooksContainer extends Component {
No playbooks
</Title>
<EmptyStateBody>
No playbooks have been found when querying the ARA API server.
No playbooks have been found when querying the ARA API
server.
</EmptyStateBody>
<Button
variant="primary"