Axios Why, then and catch are executed, could you show me the code, please?

.then & .catch will only execute one, why the for is executed, the following code is not executed, and why the error in catch reports to undefined, I don"t understand

            axios.post(url.logintools,this.userInfoFromData)
                .then(response => {
                    console.log(response)
                    //
                    var permissionsChildren = new Array()
                    var permissionsParent = new Array()
                    for(var i = 0; i<=response.data.responseDataObject.permissionsAll.permissionsChildren.length; iPP){
                        permissionsChildren.push(response.data.responseDataObject.permissionsAll.permissionsChildren[i].permissionName)
                    }
                    console.log(this.permissionsChildren)//
                    window.localStorage.setItem("permissionsChildren",permissionsChildren);//
                })
                .catch(error => {
                    console.log(error);//permissionName is undefined
                });
May.20,2022
The reason for

has been found. I < = loops one more time than expected, so the last permissionName does not exist, so go directly to catch


this is usually a mistake in your then method, so you will go to catch.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c1bc34-332a5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c1bc34-332a5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?