前端通过大量的API与后端进行交互,这些API也有可能出错。
下面的示例中,登陆账户时密码错误,因此会报403错误。
开发者可以在Fundebug控制台错误详情:
Fundebug插件捕获的错误数据如下:
"notifierVersion": "0.2.0",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0",
"locale": "zh",
"url": "http://localhost:4000",
"time": 1502864518516,
"type": "httpError",
"req": {
"method": "POST",
"url": "https://www.fundebug.com/login"
"res": {
"status": 403,
"statusText": "Forbidden",
"response": "{\"error\":\"wrong password\"}"
}
HTTP请求错误的type属性值为httpError。