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:
parent
acadff27db
commit
41c073b8fd
|
@ -31,7 +31,7 @@ export class PlaybooksContainer extends Component {
|
||||||
getPlaybooks()
|
getPlaybooks()
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
let errorMessage = "";
|
let errorMessage = "";
|
||||||
if (error.status) {
|
if (error.response) {
|
||||||
errorMessage = error.message;
|
errorMessage = error.message;
|
||||||
} else {
|
} else {
|
||||||
errorMessage = `Server located at ${
|
errorMessage = `Server located at ${
|
||||||
|
@ -83,7 +83,8 @@ export class PlaybooksContainer extends Component {
|
||||||
No playbooks
|
No playbooks
|
||||||
</Title>
|
</Title>
|
||||||
<EmptyStateBody>
|
<EmptyStateBody>
|
||||||
No playbooks have been found when querying the ARA API server.
|
No playbooks have been found when querying the ARA API
|
||||||
|
server.
|
||||||
</EmptyStateBody>
|
</EmptyStateBody>
|
||||||
<Button
|
<Button
|
||||||
variant="primary"
|
variant="primary"
|
||||||
|
|
Loading…
Reference in New Issue