diff --git a/lib/connection/connection.js b/lib/connection/connection.js index cb5e33cab..1e24e38a9 100644 --- a/lib/connection/connection.js +++ b/lib/connection/connection.js @@ -197,7 +197,7 @@ function Connection(context) { await this.heartbeatAsync(); return true; } catch (e) { - Logger.getInstance().debug('Connection[id: %s] - heartbeat failed: %s', this.getId(), JSON.stringify(e, Util.getCircularReplacer())); + Logger.getInstance().debug('Connection[id: %s] - heartbeat failed: %s', this.getId(), JSON.stringify(e, Object.getOwnPropertyNames(e))); return false; } }; diff --git a/lib/services/large_result_set.js b/lib/services/large_result_set.js index 826376561..ac1a570d2 100644 --- a/lib/services/large_result_set.js +++ b/lib/services/large_result_set.js @@ -65,8 +65,8 @@ function LargeResultSetService(connectionConfig, httpClient) { // err happens on timeouts and response is passed when server responded if (err || isUnsuccessfulResponse(response)) { // if we're running in DEBUG loglevel, probably we want to see the full error too - const logErr = err ? JSON.stringify(err, Util.getCircularReplacer()) - : `status: ${JSON.stringify(response.status)} ${JSON.stringify(response.statusText)}` + const logErr = err ? JSON.stringify(err, Object.getOwnPropertyNames(err)) + : `status: ${JSON.stringify(response.status)} ${JSON.stringify(response.statusText)}` + ` headers: ${JSON.stringify(response.headers)}`; Logger.getInstance().debug('Encountered an error when getting data from cloud storage: ' + logErr); // if we haven't exceeded the maximum number of retries yet and the diff --git a/lib/services/sf.js b/lib/services/sf.js index f32ecb04f..17ec85d80 100644 --- a/lib/services/sf.js +++ b/lib/services/sf.js @@ -594,7 +594,7 @@ function StateAbstract(options) { if (err) { // if we're running in DEBUG loglevel, probably we want to see the full error instead Logger.getInstance().debug('Encountered an error when sending the request. Details: ' - + JSON.stringify(err, Util.getCircularReplacer())); + + JSON.stringify(err, Object.getOwnPropertyNames(err))); err = Errors.createNetworkError( ErrorCodes.ERR_SF_NETWORK_COULD_NOT_CONNECT, err);