@lgsm/modules 1.5.6 → 1.5.7
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/main.js +5 -5
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -7072,17 +7072,17 @@ function zu(e, t, n) {
|
|
|
7072
7072
|
), Me.interceptors.response.use(
|
|
7073
7073
|
(r) => r,
|
|
7074
7074
|
(r) => {
|
|
7075
|
-
var s, a, i, d, c, u;
|
|
7075
|
+
var s, a, i, d, c, u, l, b, w, h;
|
|
7076
7076
|
const o = r.response.status;
|
|
7077
|
-
if (o == 401)
|
|
7077
|
+
if (o == 401 && ((a = (s = r.response) == null ? void 0 : s.data) != null && a.message.includes("expired") || (d = (i = r.response) == null ? void 0 : i.data) != null && d.message.includes("revoked")))
|
|
7078
7078
|
ir("Unauthorized", "Your session has expired. Please log in again."), setTimeout(() => {
|
|
7079
7079
|
ou(n);
|
|
7080
7080
|
}, 1500);
|
|
7081
7081
|
else if (o > 299) {
|
|
7082
|
-
const
|
|
7082
|
+
const p = ((c = r.config) == null ? void 0 : c.url) || "", g = p.substring(p.lastIndexOf("/"));
|
|
7083
7083
|
ir(
|
|
7084
|
-
`Error ${(
|
|
7085
|
-
`${((
|
|
7084
|
+
`Error ${(u = r.response) == null ? void 0 : u.status} for ${g}`,
|
|
7085
|
+
`${((b = (l = r.response) == null ? void 0 : l.data) == null ? void 0 : b.message) || r.message || "An unexpected error occurred"} [${((h = (w = r.response) == null ? void 0 : w.data) == null ? void 0 : h.errorCode) || "N/A"}]`
|
|
7086
7086
|
);
|
|
7087
7087
|
}
|
|
7088
7088
|
return Promise.reject(r);
|