mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
handle null error response
This commit is contained in:
@@ -48,7 +48,7 @@ class AWXLogin extends Component {
|
|||||||
try {
|
try {
|
||||||
await api.login(username, password);
|
await api.login(username, password);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response.status === 401) {
|
if (error.response && error.response.status === 401) {
|
||||||
this.setState({ isInputValid: false });
|
this.setState({ isInputValid: false });
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user