@clairejs/client 3.5.0 → 3.5.1
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/README.md +2 -1
- package/dist/api/RefreshHttpClient.js +2 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,11 +33,7 @@ export class RefreshHttpClient extends DefaultHttpClient {
|
|
|
33
33
|
}
|
|
34
34
|
async errorHandler(operation, err) {
|
|
35
35
|
if (err.name === Errors.TOKEN_EXPIRED().name) {
|
|
36
|
-
return await this.refreshToken()
|
|
37
|
-
.then(operation)
|
|
38
|
-
.catch((err) => {
|
|
39
|
-
throw err.response.data || err;
|
|
40
|
-
});
|
|
36
|
+
return await this.refreshToken().then(operation);
|
|
41
37
|
}
|
|
42
38
|
throw err;
|
|
43
39
|
}
|
|
@@ -58,7 +54,7 @@ export class RefreshHttpClient extends DefaultHttpClient {
|
|
|
58
54
|
}
|
|
59
55
|
try {
|
|
60
56
|
this.refreshing = true;
|
|
61
|
-
token = await this.refreshSession(token.refreshToken);
|
|
57
|
+
token = await this.refreshSession(token.refreshToken).catch(() => undefined);
|
|
62
58
|
if (!token) {
|
|
63
59
|
throw Errors.SESSION_EXPIRED();
|
|
64
60
|
}
|