How to get the returned Status Code 404 status codes in axios

cannot get the returned Status Code 404 status codes in the response interceptor

in main.js

// 
axios.interceptors.request.use(function (config) {
  config.headers["X-Requested-With"] = "XMLHttpRequest"
  console.log(config);
  // 
  return config;
}, function (error) {
  console.log(error);
  // 
  return Promise.reject(error);
});

// 
axios.interceptors.response.use(function (response) {
  console.log(response);
  // 
  return response;
}, function (error) {
  console.log(error.response.status);
  // 
  return Promise.reject(error);
});

request:

    this.$http.get("/url").then(function(res){
          console.log(res)
        }).catch(function(err){
          console.log(err.response)
        })
Oct.22,2021

The response interceptor in

axios can get

   

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