mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 03:42:16 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -2,7 +2,12 @@ import { createSign } from 'crypto';
|
||||
|
||||
import type { IExecuteFunctions, IHookFunctions } from 'n8n-core';
|
||||
|
||||
import type { IDataObject, IHttpRequestOptions, ILoadOptionsFunctions } from 'n8n-workflow';
|
||||
import type {
|
||||
IDataObject,
|
||||
IHttpRequestOptions,
|
||||
ILoadOptionsFunctions,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
/**
|
||||
@@ -62,7 +67,7 @@ export async function wiseApiRequest(
|
||||
response = await this.helpers.httpRequest(options);
|
||||
} catch (error) {
|
||||
delete error.config;
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
|
||||
if (response.statusCode >= 200 && response.statusCode < 300) {
|
||||
@@ -93,7 +98,7 @@ export async function wiseApiRequest(
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), {
|
||||
message: 'Error signing SCA request, check your private key',
|
||||
...error,
|
||||
...(error as JsonObject),
|
||||
});
|
||||
}
|
||||
// Retry the request with signed token
|
||||
@@ -106,7 +111,10 @@ export async function wiseApiRequest(
|
||||
});
|
||||
}
|
||||
} else {
|
||||
throw new NodeApiError(this.getNode(), { ...response, message: response.statusMessage });
|
||||
throw new NodeApiError(this.getNode(), {
|
||||
...(response as JsonObject),
|
||||
message: response.statusMessage,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user