You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In src/middleware/request.js line 47 we pass in res.body as the third param to handleResponse function. But the third param in that function is err, so even on a valid response it sees the body as an error and will log it accordingly. Also, on line 19 we’re logging using err.toString(), but because err is actually an object in this case it will just output [object Object] when cast to string, so the resulting trace looks like this (irrelevant parts removed):
Should switch this to JSON.stringify(err) instead. But should also fix issue which flags this response as an error anyway, as you can see that statusCode was 200 in this case.
The text was updated successfully, but these errors were encountered:
In src/middleware/request.js line 47 we pass in res.body as the third param to handleResponse function. But the third param in that function is err, so even on a valid response it sees the body as an error and will log it accordingly. Also, on line 19 we’re logging using err.toString(), but because err is actually an object in this case it will just output [object Object] when cast to string, so the resulting trace looks like this (irrelevant parts removed):
{
"operation": "PUT:/customerinformationservice/Customers/df40685f-3003-475a-b216-846a88ff739f/WebVerificationStatus/14E10B940C344963B3C7143B026A2139",
"tags": {
"http.method": "PUT",
"http.url": "https://sxgprod.nordstrom.net:443/customerinformationservice/Customers/df40685f-3003-475a-b216-846a88ff739f/WebVerificationStatus/14E10B940C344963B3C7143B026A2139",
"error": true,
"http.status_code": 200
},
"logs": [
{
"event": "error",
"error.object": "[object Object]"
}
]
}
Should switch this to JSON.stringify(err) instead. But should also fix issue which flags this response as an error anyway, as you can see that statusCode was 200 in this case.
The text was updated successfully, but these errors were encountered: