@@ -17,6 +17,7 @@ import { type PathResolver } from "./core/pathResolver";
1717import { type SecretsManager } from "./core/secretsManager" ;
1818import { type DeploymentManager } from "./deployment/deploymentManager" ;
1919import { CertificateError } from "./error/certificateError" ;
20+ import { toError } from "./error/errorUtils" ;
2021import { type Logger } from "./logging/logger" ;
2122import { type LoginCoordinator } from "./login/loginCoordinator" ;
2223import { maybeAskAgent , maybeAskUrl } from "./promptUtils" ;
@@ -258,7 +259,7 @@ export class Commands {
258259 const items : Array < {
259260 label : string ;
260261 description : string ;
261- hostname : string | undefined ;
262+ hostname : string | null ;
262263 } > = hostnames . map ( ( hostname ) => ( {
263264 label : `$(key) ${ hostname } ` ,
264265 description : "Remove stored credentials" ,
@@ -270,7 +271,7 @@ export class Commands {
270271 items . push ( {
271272 label : "$(trash) Remove All" ,
272273 description : `Remove credentials for all ${ hostnames . length } deployments` ,
273- hostname : undefined ,
274+ hostname : null ,
274275 } ) ;
275276 }
276277
@@ -285,6 +286,7 @@ export class Commands {
285286
286287 if ( selected . hostname ) {
287288 await this . secretsManager . clearAllAuthData ( selected . hostname ) ;
289+ this . logger . info ( "Removed credentials for" , selected . hostname ) ;
288290 vscode . window . showInformationMessage (
289291 `Removed credentials for ${ selected . hostname } ` ,
290292 ) ;
@@ -302,6 +304,10 @@ export class Commands {
302304 await Promise . all (
303305 hostnames . map ( ( h ) => this . secretsManager . clearAllAuthData ( h ) ) ,
304306 ) ;
307+ this . logger . info (
308+ "Removed credentials for all deployments:" ,
309+ hostnames . join ( ", " ) ,
310+ ) ;
305311 vscode . window . showInformationMessage (
306312 "Removed credentials for all deployments" ,
307313 ) ;
@@ -310,7 +316,7 @@ export class Commands {
310316 } catch ( error : unknown ) {
311317 this . logger . error ( "Failed to manage stored credentials" , error ) ;
312318 vscode . window . showErrorMessage (
313- " Failed to manage stored credentials. Storage may be corrupted." ,
319+ ` Failed to manage stored credentials: ${ toError ( error ) . message } ` ,
314320 ) ;
315321 }
316322 }
0 commit comments