Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-koenig committed Jun 17, 2024
1 parent 91693a4 commit 89eaf41
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions lib/simple-vertec-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ export default class SimpleVertecApi {
* @return {boolean} Boolean determining wether a retry attempt should be made or not
*/
requestRetryStrategy(error) {
delete error?.config?.headers?.Authorization;

if (!error.response) {
this.error('Retry Strategy Error, No Response given', error);

Expand Down Expand Up @@ -565,17 +567,6 @@ export default class SimpleVertecApi {
},
onRetry: (retryCount, error, requestConfig) => {
this.log('retrying request for ' + xmlString + ' for the ' + retryCount + ' time due to ' + error.message);

vertecSessionForRequest++;

// start with session = 2 to avoid any conflicts of first session, which is maybe used by other processes
if (vertecSessionForRequest > (vertecMaxSessionsForRequests + 1)) {
vertecSessionForRequest = 2;
}

requestConfig.headers.VertecSessionTag = `${vertecSessionForRequest}`;

this.log('Vertec session: ' + vertecSessionForRequest);
this.log('Vertec request count: ' + (vertecRequestCount++));
},
retryCondition: (error) => {
Expand Down

0 comments on commit 89eaf41

Please sign in to comment.