{"record":{"id":"bc7c8c5469a15c35","repo":"PanJiaChen/vue-admin-template","slug":"error-message","errorCode":null,"errorMessage":"error.message","messagePattern":"error\\.message","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/utils/request.js","lineNumber":77,"sourceCode":"        MessageBox.confirm('You have been logged out, you can cancel to stay on this page, or log in again', 'Confirm logout', {\n          confirmButtonText: 'Re-Login',\n          cancelButtonText: 'Cancel',\n          type: 'warning'\n        }).then(() => {\n          store.dispatch('user/resetToken').then(() => {\n            location.reload()\n          })\n        })\n      }\n      return Promise.reject(new Error(res.message || 'Error'))\n    } else {\n      return res\n    }\n  },\n  error => {\n    console.log('err' + error) // for debug\n    Message({\n      message: error.message,\n      type: 'error',\n      duration: 5 * 1000\n    })\n    return Promise.reject(error)\n  }\n)\n\nexport default service\n","sourceCodeStart":59,"sourceCodeEnd":86,"githubUrl":"https://github.com/PanJiaChen/vue-admin-template/blob/4c18a3f47bdb417ad8a25f09910f848cb574dee2/src/utils/request.js#L59-L86","documentation":"Network-layer error handler in the axios response interceptor: fires when the request fails before a valid HTTP response is produced (timeout, DNS, CORS, connection refused) or axios itself rejects, and displays axios's error.message to the user.","triggerScenarios":"Thrown at src/utils/request.js:77 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the browser network tab to identify the underlying failure (status 0, timeout, ERR_CONNECTION)","Verify the API base URL, proxy configuration, and CORS settings on the server","Add a request timeout and friendly mapping of common network error.message strings"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c18a3f47bdb417ad8a25f09910f848cb574dee2","analyzedAt":"2026-09-02T02:49:53.558Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}