File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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: │` ) )
You can’t perform that action at this time.
0 commit comments