diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c07579f5d..d06dc3f67b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/packages/create-sitecore-jss/src/templates/nextjs/src/lib/dictionary-service-factory.ts b/packages/create-sitecore-jss/src/templates/nextjs/src/lib/dictionary-service-factory.ts index 5079b06129..9aa53dede7 100644 --- a/packages/create-sitecore-jss/src/templates/nextjs/src/lib/dictionary-service-factory.ts +++ b/packages/create-sitecore-jss/src/templates/nextjs/src/lib/dictionary-service-factory.ts @@ -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, diff --git a/packages/create-sitecore-jss/src/templates/nextjs/src/lib/layout-service-factory.ts b/packages/create-sitecore-jss/src/templates/nextjs/src/lib/layout-service-factory.ts index 464eb2b3ee..84e92f8dc0 100644 --- a/packages/create-sitecore-jss/src/templates/nextjs/src/lib/layout-service-factory.ts +++ b/packages/create-sitecore-jss/src/templates/nextjs/src/lib/layout-service-factory.ts @@ -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,