Course lesson

Handle Errors when Data Fetching in Vue with Axios

We'll handle any fetching errors using the .catch() property of the axios promise. We'll also add some indication for our users to let them know that we had a problem.

Duration
1 min
Access
Pro
Transcript
Available

We'll handle any fetching errors using the .catch() property of the axios promise. We'll also add some indication for our users to let them know that we had a problem.

We'll do this by setting an error data property to true when we have an error and conditionally render an error message to the user.