mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix: Error processing and output pane improvements (no-changelog) (#9626)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -37,7 +37,6 @@ export async function calApiRequest(
|
||||
try {
|
||||
return await this.helpers.httpRequestWithAuthentication.call(this, 'calApi', options);
|
||||
} catch (error) {
|
||||
if (error instanceof NodeApiError) throw error;
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -435,7 +435,6 @@ export class Coda implements INodeType {
|
||||
});
|
||||
continue;
|
||||
}
|
||||
if (error instanceof NodeApiError) throw error;
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
@@ -803,7 +802,6 @@ export class Coda implements INodeType {
|
||||
});
|
||||
continue;
|
||||
}
|
||||
if (error instanceof NodeApiError) throw error;
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,6 +276,11 @@ export class GetResponse implements INodeType {
|
||||
if (updateFields.customFieldsUi) {
|
||||
const customFieldValues = (updateFields.customFieldsUi as IDataObject)
|
||||
.customFieldValues as IDataObject[];
|
||||
customFieldValues.forEach((entry) => {
|
||||
if (typeof entry.value === 'string') {
|
||||
entry.value = entry.value.split(',').map((value) => value.trim());
|
||||
}
|
||||
});
|
||||
if (customFieldValues) {
|
||||
body.customFieldValues = customFieldValues;
|
||||
delete body.customFieldsUi;
|
||||
|
||||
@@ -57,8 +57,6 @@ export async function googleApiRequest(
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof NodeApiError) throw error;
|
||||
|
||||
if (error.code === 'ERR_OSSL_PEM_NO_START_LINE') {
|
||||
error.statusCode = '401';
|
||||
}
|
||||
|
||||
@@ -1869,8 +1869,20 @@ export class HttpRequestV3 implements INodeType {
|
||||
if (autoDetectResponseFormat && responseData.reason.error instanceof Buffer) {
|
||||
responseData.reason.error = Buffer.from(responseData.reason.error as Buffer).toString();
|
||||
}
|
||||
const error = new NodeApiError(this.getNode(), responseData as JsonObject, { itemIndex });
|
||||
|
||||
let error;
|
||||
if (responseData?.reason instanceof NodeApiError) {
|
||||
error = responseData.reason;
|
||||
set(error, 'context.itemIndex', itemIndex);
|
||||
} else {
|
||||
const errorData = (
|
||||
responseData.reason ? responseData.reason : responseData
|
||||
) as JsonObject;
|
||||
error = new NodeApiError(this.getNode(), errorData, { itemIndex });
|
||||
}
|
||||
|
||||
set(error, 'context.request', sanitizedRequests[itemIndex]);
|
||||
|
||||
throw error;
|
||||
} else {
|
||||
removeCircularRefs(responseData.reason as JsonObject);
|
||||
|
||||
@@ -27,7 +27,6 @@ export async function uprocApiRequest(
|
||||
try {
|
||||
return await this.helpers.httpRequestWithAuthentication.call(this, 'uprocApi', options);
|
||||
} catch (error) {
|
||||
if (error instanceof NodeApiError) throw error;
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user