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/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client/AbstractClient.ts +4 -1
package/package.json
CHANGED
|
@@ -437,7 +437,10 @@ class AbstractClient<D extends MetadataDefinition> {
|
|
|
437
437
|
return response
|
|
438
438
|
.json()
|
|
439
439
|
.then((body) => {
|
|
440
|
-
if (
|
|
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;
|