From 9ac5673c08e6bea452fe4735e653d11e90e350e8 Mon Sep 17 00:00:00 2001 From: Dustin Popp Date: Thu, 23 May 2019 19:06:54 -0500 Subject: [PATCH] fix: remove node request objects from detailed response This will prevent the circular JSON error when attempting to stringify the detailed response --- lib/requestwrapper.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/requestwrapper.ts b/lib/requestwrapper.ts index 03ea29cfd..4a3dba958 100644 --- a/lib/requestwrapper.ts +++ b/lib/requestwrapper.ts @@ -291,6 +291,8 @@ export function sendRequest(parameters, _callback) { axios(extend(true, {}, options, requestParams)) .then(res => { + delete res.config; + delete res.request; // the other sdks use the interface `result` for the body _callback(null, res.data, res); })