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

@@ -611,22 +611,22 @@ export class HttpRequestV1 implements INodeType {
try {
httpBasicAuth = await this.getCredentials('httpBasicAuth');
} catch (_) {}
} catch {}
try {
httpDigestAuth = await this.getCredentials('httpDigestAuth');
} catch (_) {}
} catch {}
try {
httpHeaderAuth = await this.getCredentials('httpHeaderAuth');
} catch (_) {}
} catch {}
try {
httpQueryAuth = await this.getCredentials('httpQueryAuth');
} catch (_) {}
} catch {}
try {
oAuth1Api = await this.getCredentials('oAuth1Api');
} catch (_) {}
} catch {}
try {
oAuth2Api = await this.getCredentials('oAuth2Api');
} catch (_) {}
} catch {}
let requestOptions: OptionsWithUri;
let setUiParameter: IDataObject;

View File

@@ -621,7 +621,7 @@ export class HttpRequestV2 implements INodeType {
| 'predefinedCredentialType'
| 'genericCredentialType'
| 'none';
} catch (_) {}
} catch {}
let httpBasicAuth;
let httpDigestAuth;
@@ -637,32 +637,32 @@ export class HttpRequestV2 implements INodeType {
if (genericAuthType === 'httpBasicAuth') {
try {
httpBasicAuth = await this.getCredentials('httpBasicAuth');
} catch (_) {}
} catch {}
} else if (genericAuthType === 'httpDigestAuth') {
try {
httpDigestAuth = await this.getCredentials('httpDigestAuth');
} catch (_) {}
} catch {}
} else if (genericAuthType === 'httpHeaderAuth') {
try {
httpHeaderAuth = await this.getCredentials('httpHeaderAuth');
} catch (_) {}
} catch {}
} else if (genericAuthType === 'httpQueryAuth') {
try {
httpQueryAuth = await this.getCredentials('httpQueryAuth');
} catch (_) {}
} catch {}
} else if (genericAuthType === 'oAuth1Api') {
try {
oAuth1Api = await this.getCredentials('oAuth1Api');
} catch (_) {}
} catch {}
} else if (genericAuthType === 'oAuth2Api') {
try {
oAuth2Api = await this.getCredentials('oAuth2Api');
} catch (_) {}
} catch {}
}
} else if (authentication === 'predefinedCredentialType') {
try {
nodeCredentialType = this.getNodeParameter('nodeCredentialType', 0) as string;
} catch (_) {}
} catch {}
}
let requestOptions: OptionsWithUri;

View File

@@ -888,7 +888,7 @@ export class HttpRequestV3 implements INodeType {
| 'predefinedCredentialType'
| 'genericCredentialType'
| 'none';
} catch (_) {}
} catch {}
let httpBasicAuth;
let httpDigestAuth;
@@ -904,32 +904,32 @@ export class HttpRequestV3 implements INodeType {
if (genericAuthType === 'httpBasicAuth') {
try {
httpBasicAuth = await this.getCredentials('httpBasicAuth');
} catch (_) {}
} catch {}
} else if (genericAuthType === 'httpDigestAuth') {
try {
httpDigestAuth = await this.getCredentials('httpDigestAuth');
} catch (_) {}
} catch {}
} else if (genericAuthType === 'httpHeaderAuth') {
try {
httpHeaderAuth = await this.getCredentials('httpHeaderAuth');
} catch (_) {}
} catch {}
} else if (genericAuthType === 'httpQueryAuth') {
try {
httpQueryAuth = await this.getCredentials('httpQueryAuth');
} catch (_) {}
} catch {}
} else if (genericAuthType === 'oAuth1Api') {
try {
oAuth1Api = await this.getCredentials('oAuth1Api');
} catch (_) {}
} catch {}
} else if (genericAuthType === 'oAuth2Api') {
try {
oAuth2Api = await this.getCredentials('oAuth2Api');
} catch (_) {}
} catch {}
}
} else if (authentication === 'predefinedCredentialType') {
try {
nodeCredentialType = this.getNodeParameter('nodeCredentialType', 0) as string;
} catch (_) {}
} catch {}
}
let requestOptions: OptionsWithUri = {
@@ -1110,7 +1110,7 @@ export class HttpRequestV3 implements INodeType {
if (typeof jsonBodyParameter !== 'object' && jsonBodyParameter !== null) {
try {
JSON.parse(jsonBodyParameter);
} catch (_) {
} catch {
throw new NodeOperationError(
this.getNode(),
'JSON parameter need to be an valid JSON',
@@ -1163,7 +1163,7 @@ export class HttpRequestV3 implements INodeType {
// query is specified using JSON
try {
JSON.parse(jsonQueryParameter);
} catch (_) {
} catch {
throw new NodeOperationError(
this.getNode(),
'JSON parameter need to be an valid JSON',
@@ -1188,7 +1188,7 @@ export class HttpRequestV3 implements INodeType {
// body is specified using JSON
try {
JSON.parse(jsonHeadersParameter);
} catch (_) {
} catch {
throw new NodeOperationError(
this.getNode(),
'JSON parameter need to be an valid JSON',