javascript – JS/Ionic:TypeError: Cannot read property code of undefined

javascript – JS/Ionic:TypeError: Cannot read property code of undefined

It seems like response.data.error is returning as undefined (or returning nothing, which leads undefined), that is the reason, if you try to read response.data.error.code, you get that error.

You can try putting a breakpoint on if (response.data.error.code === 000) { and see what is the output in response and check accordingly on errors.

javascript – JS/Ionic:TypeError: Cannot read property code of undefined

Leave a Reply

Your email address will not be published.