Skip to content

Commit 5630662

Browse files
authored
PD-5285, PD-3904 (#2800)
* PD-5285 * PD-3904
1 parent 8fd92af commit 5630662

47 files changed

Lines changed: 327 additions & 262 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/app.module.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { TitleService } from './core/title-service/title.service'
1313
import { HttpContentTypeHeaderInterceptor } from './core/http-content-type-header-interceptor/http-content-type-header-interceptor'
1414
import { XsrfFallbackInterceptor } from './core/xsrf/xsrf-fallback.interceptor'
1515
import { FirefoxXsrfPreloadInterceptor } from './core/lang-preload/firefox-xsrf-preload.interceptor'
16+
import { RetryTransientInterceptor } from './core/http/retry-transient.interceptor'
1617
import {
1718
HTTP_INTERCEPTORS,
1819
provideHttpClient,
@@ -52,6 +53,11 @@ import { FormsModule } from '@angular/forms'
5253
useClass: FirefoxXsrfPreloadInterceptor,
5354
multi: true,
5455
},
56+
{
57+
provide: HTTP_INTERCEPTORS,
58+
useClass: RetryTransientInterceptor,
59+
multi: true,
60+
},
5561
{
5662
provide: HTTP_INTERCEPTORS,
5763
useClass: HttpContentTypeHeaderInterceptor,

src/app/cdk/interstitials/interstitials.service.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
catchError,
66
filter,
77
map,
8-
retry,
98
switchMap,
109
take,
1110
tap,
@@ -85,7 +84,6 @@ export class InterstitialsService {
8584
`${runtimeEnvironment.API_WEB}account/hasInterstitialFlag/${interstitialName}`
8685
)
8786
.pipe(
88-
retry(3),
8987
switchMap((hasFlag) => {
9088
if (hasFlag) {
9189
return this.setInterstitialsViewed(interstitialName, false).pipe(
@@ -105,7 +103,6 @@ export class InterstitialsService {
105103
interstitialName
106104
)
107105
.pipe(
108-
retry(3),
109106
catchError((error) => this._errorHandler.handleError(error))
110107
)
111108
}

src/app/core/account-actions-deactivate/account-actions-deactivate.service.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HttpClient, HttpHeaders } from '@angular/common/http'
22
import { Injectable } from '@angular/core'
33
import { Observable } from 'rxjs'
4-
import { catchError, retry } from 'rxjs/operators'
4+
import { catchError } from 'rxjs/operators'
55

66
import { ErrorHandlerService } from '../error-handler/error-handler.service'
77
import {
@@ -35,7 +35,6 @@ export class AccountActionsDeactivateService {
3535
runtimeEnvironment.API_WEB + `account/deactivate/` + token
3636
)
3737
.pipe(
38-
retry(3),
3938
catchError((error) => this._errorHandler.handleError(error))
4039
)
4140
}
@@ -50,7 +49,6 @@ export class AccountActionsDeactivateService {
5049
data
5150
)
5251
.pipe(
53-
retry(3),
5452
catchError((error) => this._errorHandler.handleError(error))
5553
)
5654
}
@@ -62,7 +60,6 @@ export class AccountActionsDeactivateService {
6260
this.options
6361
)
6462
.pipe(
65-
retry(3),
6663
catchError((error) => this._errorHandler.handleError(error))
6764
)
6865
}

src/app/core/account-actions-download/account-actions-download.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { HttpClient } from '@angular/common/http'
22
import { Inject, Injectable } from '@angular/core'
3-
import { catchError, retry, tap } from 'rxjs/operators'
3+
import { catchError, tap } from 'rxjs/operators'
44
import { WINDOW } from 'src/app/cdk/window'
55
import { ErrorHandlerService } from '../error-handler/error-handler.service'
66

@@ -44,7 +44,6 @@ export class AccountActionsDownloadService {
4444
link.click()
4545
this._window.document.body.removeChild(link)
4646
}),
47-
retry(3),
4847
catchError((error) => this._errorHandler.handleError(error))
4948
)
5049
}

src/app/core/account-actions-duplicated/account-actions-duplicated.service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HttpClient, HttpHeaders } from '@angular/common/http'
22
import { Injectable } from '@angular/core'
33
import { Observable } from 'rxjs'
4-
import { catchError, retry } from 'rxjs/operators'
4+
import { catchError } from 'rxjs/operators'
55
import { ERROR_REPORT } from 'src/app/errors'
66
import { DuplicateRemoveEndpoint } from 'src/app/types/account-actions-duplicated'
77

@@ -29,7 +29,6 @@ export class AccountActionsDuplicatedService {
2929
{ headers: this.headers }
3030
)
3131
.pipe(
32-
retry(3),
3332
catchError((error) =>
3433
this._errorHandler.handleError(error, ERROR_REPORT.STANDARD_VERBOSE)
3534
)
@@ -46,7 +45,6 @@ export class AccountActionsDuplicatedService {
4645
{ headers: this.headers }
4746
)
4847
.pipe(
49-
retry(3),
5048
catchError((error) => this._errorHandler.handleError(error))
5149
)
5250
}

src/app/core/account-default-email-frequencies/account-default-email-frequencies.service.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HttpClient, HttpHeaders } from '@angular/common/http'
22
import { Injectable } from '@angular/core'
33
import { Observable } from 'rxjs'
4-
import { catchError, retry } from 'rxjs/operators'
4+
import { catchError } from 'rxjs/operators'
55
import { AccountDefaultEmailFrequenciesEndpoint } from 'src/app/types/account-default-visibility.endpoint'
66

77
import { ErrorHandlerService } from '../error-handler/error-handler.service'
@@ -25,7 +25,6 @@ export class AccountDefaultEmailFrequenciesService {
2525
{ headers: this.headers }
2626
)
2727
.pipe(
28-
retry(3),
2928
catchError((error) => this._errorHandler.handleError(error))
3029
)
3130
}
@@ -39,7 +38,6 @@ export class AccountDefaultEmailFrequenciesService {
3938
{ headers: this.headers }
4039
)
4140
.pipe(
42-
retry(3),
4341
catchError((error) => this._errorHandler.handleError(error))
4442
)
4543
}
@@ -52,7 +50,6 @@ export class AccountDefaultEmailFrequenciesService {
5250
{ headers: this.headers }
5351
)
5452
.pipe(
55-
retry(3),
5653
catchError((error) => this._errorHandler.handleError(error))
5754
)
5855
}
@@ -65,7 +62,6 @@ export class AccountDefaultEmailFrequenciesService {
6562
{ headers: this.headers }
6663
)
6764
.pipe(
68-
retry(3),
6965
catchError((error) => this._errorHandler.handleError(error))
7066
)
7167
}
@@ -79,7 +75,6 @@ export class AccountDefaultEmailFrequenciesService {
7975
{ headers: this.headers }
8076
)
8177
.pipe(
82-
retry(3),
8378
catchError((error) => this._errorHandler.handleError(error))
8479
)
8580
}

src/app/core/account-default-visibility/account-default-visibility.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HttpClient, HttpHeaders } from '@angular/common/http'
22
import { Injectable } from '@angular/core'
33
import { Observable } from 'rxjs'
4-
import { catchError, retry } from 'rxjs/operators'
4+
import { catchError } from 'rxjs/operators'
55
import { VisibilityStrings } from 'src/app/types/common.endpoint'
66
import { ErrorHandlerService } from '../error-handler/error-handler.service'
77

@@ -26,7 +26,6 @@ export class AccountDefaultVisibilityService {
2626
{ headers: this.headers }
2727
)
2828
.pipe(
29-
retry(3),
3029
catchError((error) => this._errorHandler.handleError(error))
3130
)
3231
}

src/app/core/account-security-alternate-sign-in/account-security-alternate-sign-in.service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HttpClient, HttpHeaders } from '@angular/common/http'
22
import { Injectable } from '@angular/core'
33
import { Observable } from 'rxjs'
4-
import { catchError, map, retry, switchMap } from 'rxjs/operators'
4+
import { catchError, map, switchMap } from 'rxjs/operators'
55
import { EMAIL_REGEXP } from 'src/app/constants'
66
import {
77
SocialAccount,
@@ -44,7 +44,6 @@ export class AccountSecurityAlternateSignInService {
4444
})
4545
)
4646
}),
47-
retry(3),
4847
catchError((error) => this._errorHandler.handleError(error))
4948
)
5049
}
@@ -75,7 +74,6 @@ export class AccountSecurityAlternateSignInService {
7574
}
7675
)
7776
.pipe(
78-
retry(3),
7977
catchError((error) => this._errorHandler.handleError(error))
8078
)
8179
}

src/app/core/account-security-password/account-security-password.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HttpClient, HttpHeaders } from '@angular/common/http'
22
import { Injectable } from '@angular/core'
33
import { Observable } from 'rxjs'
4-
import { catchError, retry } from 'rxjs/operators'
4+
import { catchError } from 'rxjs/operators'
55
import { AccountPasswordEndpoint } from 'src/app/types/account-settings-password'
66

77
import { ErrorHandlerService } from '../error-handler/error-handler.service'
@@ -29,7 +29,6 @@ export class AccountSecurityPasswordService {
2929
{ headers: this.headers }
3030
)
3131
.pipe(
32-
retry(3),
3332
catchError((error) => this._errorHandler.handleError(error))
3433
)
3534
}

src/app/core/account-trusted-individuals/account-trusted-individuals.service.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HttpClient, HttpHeaders } from '@angular/common/http'
22
import { Injectable } from '@angular/core'
33
import { Observable, Subject } from 'rxjs'
4-
import { catchError, map, retry, tap } from 'rxjs/operators'
4+
import { catchError, map, tap } from 'rxjs/operators'
55
import {
66
ExpandedSearchResultsContent,
77
SearchResultsByEmailOrOrcid,
@@ -34,7 +34,6 @@ export class AccountTrustedIndividualsService {
3434
{ headers: this.headers }
3535
)
3636
.pipe(
37-
retry(3),
3837
catchError((error) => this._errorHandler.handleError(error)),
3938
map((x) => {
4039
return x.map((x) => {
@@ -55,7 +54,6 @@ export class AccountTrustedIndividualsService {
5554
{ headers: this.headers }
5655
)
5756
.pipe(
58-
retry(3),
5957
catchError((error) => this._errorHandler.handleError(error)),
6058
tap(() => this.updateTrustedIndividualsSuccess.next())
6159
)
@@ -70,7 +68,6 @@ export class AccountTrustedIndividualsService {
7068
}
7169
)
7270
.pipe(
73-
retry(3),
7471
catchError((error) => this._errorHandler.handleError(error))
7572
)
7673
}
@@ -82,7 +79,6 @@ export class AccountTrustedIndividualsService {
8279
{ headers: this.headers }
8380
)
8481
.pipe(
85-
retry(3),
8682
catchError((error) => this._errorHandler.handleError(error)),
8783
tap(() => this.updateTrustedIndividualsSuccess.next())
8884
)
@@ -95,7 +91,6 @@ export class AccountTrustedIndividualsService {
9591
{ headers: this.headers }
9692
)
9793
.pipe(
98-
retry(3),
9994
catchError((error) => this._errorHandler.handleError(error))
10095
)
10196
}
@@ -107,7 +102,6 @@ export class AccountTrustedIndividualsService {
107102
{ headers: this.headers }
108103
)
109104
.pipe(
110-
retry(3),
111105
catchError((error) => this._errorHandler.handleError(error)),
112106
tap(() => this.updateTrustedIndividualsSuccess.next())
113107
)
@@ -121,7 +115,6 @@ export class AccountTrustedIndividualsService {
121115
{ headers: this.headers }
122116
)
123117
.pipe(
124-
retry(3),
125118
catchError((error) => this._errorHandler.handleError(error))
126119
)
127120
}
@@ -133,7 +126,6 @@ export class AccountTrustedIndividualsService {
133126
{ headers: this.headers }
134127
)
135128
.pipe(
136-
retry(3),
137129
catchError((error) => this._errorHandler.handleError(error)),
138130
tap(() => this.updateTrustedIndividualsSuccess.next())
139131
)

0 commit comments

Comments
 (0)