【react】reactのaxiosでリクエスト失敗時の例外処理をいれる

request .post("/getpodstatus", obj) // やりたい処理 .then(request => { this.setState({ podstatus: request.data.items[0].status.phase }); console.log(this.state.podstatus) } ) // エラー時というかやりたい処理ができなかった場合の処理 .catch(error => { this.setState({ podstatus: 'Stop' }); console.log('POST失敗時の処理') })