Skip to content

Unhandled Rejection (TypeError): Cannot read property 'error' of undefined #14

@aaron2181

Description

@aaron2181

I keep getting the below error when trying to login. How do I fix it?

Unhandled Rejection (TypeError): Cannot read property 'error' of undefined
(anonymous function)
D:/CovidApp/Covid19nu/react-frontend/src/components/Login.js:29
26 | }
27 |
28 | login(user).then(res => {

29 | if (!res.error) {
| ^ 30 | this.props.history.push(/profile)
31 | }
32 | })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions