@kedaruma/revlm-client 1.0.44 → 1.0.45
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.js +7 -0
- package/dist/index.mjs +7 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -264,6 +264,13 @@ var Revlm = class {
|
|
|
264
264
|
}
|
|
265
265
|
if (allowAuthRetry && !retrying && res.status === 401 && !this.shouldSkipAuthRetry(path)) {
|
|
266
266
|
const refreshRes = await this.refreshToken();
|
|
267
|
+
if (!refreshRes.ok) {
|
|
268
|
+
console.warn("### refresh failed:", {
|
|
269
|
+
reason: refreshRes.reason,
|
|
270
|
+
status: refreshRes.status,
|
|
271
|
+
error: refreshRes.error
|
|
272
|
+
});
|
|
273
|
+
}
|
|
267
274
|
if (this.strictRefreshCookie && !refreshRes.ok && refreshRes.reason === "no_refresh_secret") {
|
|
268
275
|
throw new Error("Refresh cookie missing. Provide a cookie-aware fetch implementation for Node/RN.");
|
|
269
276
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -221,6 +221,13 @@ var Revlm = class {
|
|
|
221
221
|
}
|
|
222
222
|
if (allowAuthRetry && !retrying && res.status === 401 && !this.shouldSkipAuthRetry(path)) {
|
|
223
223
|
const refreshRes = await this.refreshToken();
|
|
224
|
+
if (!refreshRes.ok) {
|
|
225
|
+
console.warn("### refresh failed:", {
|
|
226
|
+
reason: refreshRes.reason,
|
|
227
|
+
status: refreshRes.status,
|
|
228
|
+
error: refreshRes.error
|
|
229
|
+
});
|
|
230
|
+
}
|
|
224
231
|
if (this.strictRefreshCookie && !refreshRes.ok && refreshRes.reason === "no_refresh_secret") {
|
|
225
232
|
throw new Error("Refresh cookie missing. Provide a cookie-aware fetch implementation for Node/RN.");
|
|
226
233
|
}
|