Skip to content

fix: download template crash (getToken undefined)#68

Merged
cdot65 merged 3 commits into
cdot65:mainfrom
scthornton:fix/prompt-sets-download
May 13, 2026
Merged

fix: download template crash (getToken undefined)#68
cdot65 merged 3 commits into
cdot65:mainfrom
scthornton:fix/prompt-sets-download

Conversation

@scthornton

Copy link
Copy Markdown
Contributor

airs redteam prompt-sets download <uuid> crashes with:

Error: Cannot read properties of undefined (reading 'getToken')

The existing workaround in promptsets.ts accesses this.client.customAttacks.oauthClient.getToken() which no longer exists in the current SDK version. This replaces it with a direct OAuth token fetch using the client credentials passed to the constructor, which doesn't depend on SDK internals.

Related: cdot65/prisma-airs-sdk#77

scthornton and others added 3 commits May 12, 2026 09:02
The downloadTemplate workaround accesses SDK internals
(customAttacks.oauthClient.getToken) that no longer exist in the
current SDK version. Replace with a direct OAuth token fetch using
the client credentials from the constructor options.
SDK 0.8.3 fixes downloadTemplate to return CSV string directly. Drop the
30-line OAuth+raw-fetch workaround, delegate straight to the SDK. Update
test to mock the SDK call instead of the removed internals.
@cdot65 cdot65 merged commit 8451739 into cdot65:main May 13, 2026
4 checks passed
@cdot65 cdot65 mentioned this pull request May 13, 2026
3 tasks
cdot65 added a commit that referenced this pull request May 13, 2026
…es (#70)

- feat: --goals/--depth/--breadth flags for redteam DYNAMIC scans (#66)
- fix: CSV upload sends File w/ filename instead of bare Blob (#67)
- fix: download template — bump SDK to 0.8.3 + drop OAuth workaround (#68)

Changesets: 0015-0017.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants