We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5fb328 commit 8dc4ccaCopy full SHA for 8dc4cca
1 file changed
sdk/src/platform/Platform.ts
@@ -711,6 +711,12 @@ export default class Platform extends EventEmitter {
711
712
await this.ensureLoggedIn();
713
714
+ // Validate token before sending request
715
+ const authData = await this._auth.data();
716
+ if (!authData?.access_token || authData?.access_token?.trim() === '') {
717
+ throw new Error('Access token is empty. Please login before making API requests.');
718
+ }
719
+
720
request.headers.set('Client-Id', this._clientId);
721
if (!this._authProxy) {request.headers.set('Authorization', await this.authHeader());}
722
0 commit comments