302 error how to capture the status code? axios, can't get the error report.

Error: Network Error

at createError (eval at <anonymous> (bundle.js:1759), <anonymous>:16:15)
at XMLHttpRequest.handleError (eval at <anonymous> (bundle.js:1741), <anonymous>:87:14)

print err in interceptor is the above, without getting err.response.status

Mar.25,2021

this is not a problem with axios. XMLHttpRequest itself automatically forwards the redirect request, so you can't get it.

take a look at my test results
clipboard.png

Network
clipboard.png

therefore, the error you currently return is also the result of the final directed url.

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-1ead1d5-212b.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-1ead1d5-212b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?