mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { IExecuteFunctions, IHookFunctions } from 'n8n-core';
|
||||
|
||||
import type { IDataObject, ILoadOptionsFunctions } from 'n8n-workflow';
|
||||
import type { IDataObject, ILoadOptionsFunctions, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import type {
|
||||
@@ -54,19 +54,19 @@ export async function freshserviceApiRequest(
|
||||
|
||||
if (numberOfErrors === 1) {
|
||||
const [validationError] = error.error.errors;
|
||||
throw new NodeApiError(this.getNode(), error, {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject, {
|
||||
message,
|
||||
description: `For ${validationError.field}: ${validationError.message}`,
|
||||
});
|
||||
} else if (numberOfErrors > 1) {
|
||||
throw new NodeApiError(this.getNode(), error, {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject, {
|
||||
message,
|
||||
description: "For more information, expand 'details' below and look at 'cause' section",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,10 +83,10 @@ export async function freshserviceApiRequestAllItems(
|
||||
|
||||
do {
|
||||
const responseData = await freshserviceApiRequest.call(this, method, endpoint, body, qs);
|
||||
const key = Object.keys(responseData)[0];
|
||||
const key = Object.keys(responseData as IDataObject)[0];
|
||||
items = responseData[key];
|
||||
if (!items.length) return returnData;
|
||||
returnData.push(...items);
|
||||
returnData.push(...(items as IDataObject[]));
|
||||
qs.page++;
|
||||
} while (items.length >= 30);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user