Skip to content

Commit

Permalink
Fix retries type (#1759)
Browse files Browse the repository at this point in the history
* fix retries type error

* update changelog
  • Loading branch information
addy-pathania authored Mar 18, 2024
1 parent 11783a4 commit 09e6290
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Our versioning strategy is as follows:
* Handle additional string error codes like ECONNRESET, ETIMEDOUT, EPROTO. Can configure more using DefaultRetryStrategy.
* Retries has now been enabled by default with a default value of 3. It can be disabled by configuring it to 0.
* [Retry-After] header now falls back to the default delay time when it comes out to be empty.
([#1755](https://github.com/Sitecore/jss/pull/1755))
([#1755](https://github.com/Sitecore/jss/pull/1755)) ([#1759](https://github.com/Sitecore/jss/pull/1759))

### 🐛 Bug Fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ export class DictionaryServiceFactory {
By default it uses the `DefaultRetryStrategy` with exponential back-off factor of 2 and handles error codes 429,
502, 503, 504, 520, 521, 522, 523, 524, 'ECONNRESET', 'ETIMEDOUT' and 'EPROTO' . You can use this class or your own implementation of `RetryStrategy`.
*/
retries:
process.env.GRAPH_QL_SERVICE_RETRIES &&
parseInt(process.env.GRAPH_QL_SERVICE_RETRIES, 10),
retries: (process.env.GRAPH_QL_SERVICE_RETRIES &&
parseInt(process.env.GRAPH_QL_SERVICE_RETRIES, 10)) as number,
})
: new RestDictionaryService({
apiHost: config.sitecoreApiHost,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ export class LayoutServiceFactory {
By default it uses the `DefaultRetryStrategy` with exponential back-off factor of 2 and handles error codes 429,
502, 503, 504, 520, 521, 522, 523, 524, 'ECONNRESET', 'ETIMEDOUT' and 'EPROTO' . You can use this class or your own implementation of `RetryStrategy`.
*/
retries:
process.env.GRAPH_QL_SERVICE_RETRIES &&
parseInt(process.env.GRAPH_QL_SERVICE_RETRIES, 10),
retries: (process.env.GRAPH_QL_SERVICE_RETRIES &&
parseInt(process.env.GRAPH_QL_SERVICE_RETRIES, 10)) as number,
})
: new RestLayoutService({
apiHost: config.sitecoreApiHost,
Expand Down

0 comments on commit 09e6290

Please sign in to comment.