Comparing version 6.2.1 to 6.2.2
@@ -60,6 +60,7 @@ const request = require('./request') | ||
const err = new Error(`${error}: ${reason}`) | ||
const { method, headers, attempt } = params | ||
const { method, attempt } = params | ||
// Do not include full params object in context | ||
// as that would params.agent stringification would fail due to circular reference | ||
err.context = { method, url, body, headers, status, attempt } | ||
// Do not include headers to avoid leaking authentification data | ||
err.context = { method, url, body, status, attempt } | ||
err.stack += `\nContext: ${JSON.stringify(err.context)}` | ||
@@ -66,0 +67,0 @@ err.statusCode = err.status = status |
@@ -24,3 +24,3 @@ { | ||
], | ||
"version": "6.2.1", | ||
"version": "6.2.2", | ||
"main": "lib/cot.js", | ||
@@ -27,0 +27,0 @@ "dependencies": { |
35870
552