@spacelr/sdk 0.15.0 → 0.15.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/dist/index.js CHANGED
@@ -132,7 +132,11 @@ var SpacelrEmailVerificationRequiredError = class extends SpacelrError {
132
132
 
133
133
  // libs/sdk/src/core/http-client.ts
134
134
  function isStaleSessionBody(body) {
135
- return typeof body === "object" && body !== null && body["message"] === "stale_session";
135
+ if (typeof body !== "object" || body === null) {
136
+ return false;
137
+ }
138
+ const flat = body;
139
+ return flat["code"] === "STALE_SESSION" || flat["message"] === "stale_session";
136
140
  }
137
141
  var HttpClient = class {
138
142
  constructor(config, tokenManager) {