【发布时间】:2018-05-06 00:14:46
【问题描述】:
我正在尝试访问我的快速响应错误中的值。当我 console.log 这样的错误时......
app.use(function(err, req, res, next){
console.log(err)
});
控制台如下所示
[String: 'Error: Request returned error code: 404 and body: {"status":404,"title":"No option(s) were found with this query.","type":"https://developer.bigcommerce.com/api#api-status-codes"}']
例如;我如何访问err.title,以便将其发送给客户。
【问题讨论】:
-
答案是什么
标签: javascript node.js express