File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ export class CertificateError extends Error {
40
40
41
41
// maybeWrap returns a CertificateError if the code is a certificate error
42
42
// otherwise it returns the original error.
43
- static async maybeWrap < T > ( err : T , address : string | undefined , logger : Logger ) : Promise < CertificateError | T > {
44
- if ( address && axios . isAxiosError ( err ) ) {
43
+ static async maybeWrap < T > ( err : T , address : string , logger : Logger ) : Promise < CertificateError | T > {
44
+ if ( axios . isAxiosError ( err ) ) {
45
45
switch ( err . code ) {
46
46
case X509_ERR_CODE . UNABLE_TO_VERIFY_LEAF_SIGNATURE :
47
47
// "Unable to verify" can mean different things so we will attempt to
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
46
46
axios . interceptors . response . use (
47
47
( r ) => r ,
48
48
async ( err ) => {
49
- throw await CertificateError . maybeWrap ( err , err ? .config ?. baseURL , storage )
49
+ throw await CertificateError . maybeWrap ( err , axios . getUri ( err . config ) , storage )
50
50
} ,
51
51
)
52
52
You can’t perform that action at this time.
0 commit comments