Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update transport.js #4

Merged
merged 1 commit into from
Jun 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ Transport.prototype.httpRequest = function(params, callback) {
retryStrategy: request.RetryStrategies.HTTPOrNetworkError
};
req = httpRequest(opts, function(err, response) {
if (response.attempts > 1){
// just for tracking we're gonna log information about any retries we encounter
const attempts = response ? response.attempts : err ? err.attempts : 0
if (attempts > 1){
// just for tracking we're going to log information about any retries we encounter
// we're gonna do this as console to force it out as opposed to trying to pick up
// on whatever mechanisms this module may already be doing to controle logging
// on whatever mechanisms this module may already be doing to control logging
logger.log(
Logger.LogLevels.WARN,
'JSForce performed ' + response.attempts + ' attempts when making requests to ' + opts.url
Expand Down