Skip to content

Commit 193b038

Browse files
committed
Published using @Stream44 Studio
Signed-off-by: Christoph <christoph@christoph.diy>
1 parent 02bcc9d commit 193b038

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

caps/WorkspaceConnection.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ export async function capsule({
111111
result[key] = JSON.parse(decrypted)
112112
} catch (decryptErr: any) {
113113
const chalk = (await import('chalk')).default
114+
let currentKeyId = 'unknown'
115+
try {
116+
const keyConfig = await this.WorkspaceKey.ensureKey()
117+
const did = await this.WorkspaceKey.getDid()
118+
currentKeyId = `${keyConfig.keyName}-${did}`
119+
} catch { }
114120
console.error(chalk.red(`\n┌─────────────────────────────────────────────────────────────────┐`))
115121
console.error(chalk.red(`│ ✗ Connection Credential Decryption Failed │`))
116122
console.error(chalk.red(`├─────────────────────────────────────────────────────────────────┤`))
@@ -119,6 +125,7 @@ export async function capsule({
119125
console.error(chalk.red(`│ │`))
120126
console.error(chalk.red(`│ This credential was encrypted with a different workspace key. │`))
121127
console.error(chalk.red(`│ Encrypted with: ${keyIdentifier}`))
128+
console.error(chalk.red(`│ Current key: ${currentKeyId}`))
122129
console.error(chalk.red(`│ │`))
123130
console.error(chalk.red(`├─────────────────────────────────────────────────────────────────┤`))
124131
console.error(chalk.red(`│ To fix, delete the connection config and re-enter credentials: │`))

0 commit comments

Comments
 (0)