refactor: catch doesn't need to have a param (no-changelog) (#5614)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-03-03 18:18:49 +01:00
committed by GitHub
parent 9420b0fdf8
commit 4e244937c9
20 changed files with 59 additions and 59 deletions

View File

@@ -132,7 +132,7 @@ export class MessageEventBusDestinationWebhook
let encryptionKey: string | undefined;
try {
encryptionKey = await UserSettings.getEncryptionKey();
} catch (_) {}
} catch {}
if (encryptionKey) {
this.credentialsHelper = new CredentialsHelper(encryptionKey);
}
@@ -189,7 +189,7 @@ export class MessageEventBusDestinationWebhook
// query is specified using JSON
try {
JSON.parse(this.jsonQuery);
} catch (_) {
} catch {
console.log('JSON parameter need to be an valid JSON');
}
this.axiosRequestOptions.params = jsonParse(this.jsonQuery);
@@ -207,7 +207,7 @@ export class MessageEventBusDestinationWebhook
// body is specified using JSON
try {
JSON.parse(this.jsonHeaders);
} catch (_) {
} catch {
console.log('JSON parameter need to be an valid JSON');
}
this.axiosRequestOptions.headers = jsonParse(this.jsonHeaders);
@@ -302,27 +302,27 @@ export class MessageEventBusDestinationWebhook
if (this.genericAuthType === 'httpBasicAuth') {
try {
httpBasicAuth = await this.matchDecryptedCredentialType('httpBasicAuth');
} catch (_) {}
} catch {}
} else if (this.genericAuthType === 'httpDigestAuth') {
try {
httpDigestAuth = await this.matchDecryptedCredentialType('httpDigestAuth');
} catch (_) {}
} catch {}
} else if (this.genericAuthType === 'httpHeaderAuth') {
try {
httpHeaderAuth = await this.matchDecryptedCredentialType('httpHeaderAuth');
} catch (_) {}
} catch {}
} else if (this.genericAuthType === 'httpQueryAuth') {
try {
httpQueryAuth = await this.matchDecryptedCredentialType('httpQueryAuth');
} catch (_) {}
} catch {}
} else if (this.genericAuthType === 'oAuth1Api') {
try {
oAuth1Api = await this.matchDecryptedCredentialType('oAuth1Api');
} catch (_) {}
} catch {}
} else if (this.genericAuthType === 'oAuth2Api') {
try {
oAuth2Api = await this.matchDecryptedCredentialType('oAuth2Api');
} catch (_) {}
} catch {}
}
}