How does js call things in this module in module?

Environment WeChat Mini Programs.
Code for example:

module.exports = {
    request: function(method,url,data){
        return new Promise((resolve,reject)=>{
            wx.request({
                url:url,
                method:method,
                data:data,
                success:function(res){
                    if(res.statusCode == 401){
                        abc();
                    }else{
                        resolve(res)
                    }
                }
            })
        })
    }
}

I encapsulated a promise version of WeChat Mini Programs"s request request.
wants to validate the statusCode and process it before operating.
abc () is the handler, which is processed when the code is 401.
tell me how to repeat this function when statusCode = = 401.
that is, the desired effect is to perform abc () processing when code is 401, and execute this function directly from scratch after processing.

Mar.04,2021

bring out the function

function request(method,url,data) {
    if (404) {
        request(method, url, data)
    }
}
module.exports = {
    request
}
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-1b9b45b-37619.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-1b9b45b-37619.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?