rest-client-sdk 7.0.2 → 7.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rest-client-sdk",
3
- "version": "7.0.2",
3
+ "version": "7.0.3",
4
4
  "description": "Rest Client SDK for API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -437,7 +437,10 @@ class AbstractClient<D extends MetadataDefinition> {
437
437
  return response
438
438
  .json()
439
439
  .then((body) => {
440
- if (this.#tokenStorage && body.error === 'invalid_grant') {
440
+ if (
441
+ this.#tokenStorage &&
442
+ (body.error === 'invalid_scope' || body.error === 'access_denied')
443
+ ) {
441
444
  return this._refreshTokenAndRefetch(input, requestParams);
442
445
  }
443
446
  throw error;