[Vuejs]-Uncaught (in promise) TypeError: Cannot set property 'status'

0👍

You shouldn’t check the response status anyway beacuse if isn’t 200(OK), the code will execute the next callback that is .catch() and here you can handle the error.

0👍

I was able to get rid of the error.response.status undefined error with this:

const errStatus = (typeof error.response.status !== 'undefined') ? error.response.status : 'unknown';
const errText = (error.response.statusText != null) ? error.response.statusText : 'unknown';
const errElse = { email: [`[Error status code: ${errStatus}].....[Error status: ${errText}]......Please submit a trouble ticket`] };
this.errors = errElse;

Leave a comment