前端通过大量的API与后端进行交互,这些API也有可能出错。

    下面的示例中,登陆账户时密码错误,因此会报403错误。

    开发者可以在Fundebug控制台错误详情:

    Fundebug插件捕获的错误数据如下:

    1. "notifierVersion": "0.2.0",
    2. "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0",
    3. "locale": "zh",
    4. "url": "http://localhost:4000",
    5. "time": 1502864518516,
    6. "type": "httpError",
    7. "req": {
    8. "method": "POST",
    9. "url": "https://www.fundebug.com/login"
    10. "res": {
    11. "status": 403,
    12. "statusText": "Forbidden",
    13. "response": "{\"error\":\"wrong password\"}"
    14. }

    HTTP请求错误type属性值为httpError