Skip to content

Commit 054ca03

Browse files
Update packages/sdk/src/server/async.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent dec9efe commit 054ca03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/sdk/src/server/async.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export class ServerAsyncResponseManager extends AsyncResponseManager {
3131

3232
protected override async getOpts(): Promise<AsyncResponseManagerOpts> {
3333
const oauthToken = await this.serverOpts.getOauthToken();
34+
if (!oauthToken?.token?.access_token) {
35+
throw new Error('Invalid OAuth token structure');
36+
}
3437
const token = oauthToken.token.access_token;
3538
const projectId = await this.serverOpts.getProjectId();
3639
return {

0 commit comments

Comments
 (0)