mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix: Always retain original errors in the error chain on NodeOperationError (#4951)
This commit is contained in:
committed by
GitHub
parent
323bd78067
commit
231257d081
@@ -604,7 +604,7 @@ export class FileMaker implements INodeType {
|
||||
try {
|
||||
returnData = await layoutsApiRequest.call(this);
|
||||
} catch (error) {
|
||||
throw new NodeOperationError(this.getNode(), `FileMaker Error: ${error}`);
|
||||
throw new NodeOperationError(this.getNode(), error);
|
||||
}
|
||||
|
||||
return returnData;
|
||||
@@ -620,7 +620,7 @@ export class FileMaker implements INodeType {
|
||||
try {
|
||||
layouts = await layoutsApiRequest.call(this);
|
||||
} catch (error) {
|
||||
throw new NodeOperationError(this.getNode(), `FileMaker Error: ${error}`);
|
||||
throw new NodeOperationError(this.getNode(), error);
|
||||
}
|
||||
for (const layout of layouts) {
|
||||
returnData.push({
|
||||
@@ -638,7 +638,7 @@ export class FileMaker implements INodeType {
|
||||
try {
|
||||
fields = await getFields.call(this);
|
||||
} catch (error) {
|
||||
throw new NodeOperationError(this.getNode(), `FileMaker Error: ${error}`);
|
||||
throw new NodeOperationError(this.getNode(), error);
|
||||
}
|
||||
for (const field of fields) {
|
||||
returnData.push({
|
||||
@@ -656,7 +656,7 @@ export class FileMaker implements INodeType {
|
||||
try {
|
||||
scripts = await getScripts.call(this);
|
||||
} catch (error) {
|
||||
throw new NodeOperationError(this.getNode(), `FileMaker Error: ${error}`);
|
||||
throw new NodeOperationError(this.getNode(), error);
|
||||
}
|
||||
for (const script of scripts) {
|
||||
if (!script.isFolder) {
|
||||
@@ -676,7 +676,7 @@ export class FileMaker implements INodeType {
|
||||
try {
|
||||
portals = await getPortals.call(this);
|
||||
} catch (error) {
|
||||
throw new NodeOperationError(this.getNode(), `FileMaker Error: ${error}`);
|
||||
throw new NodeOperationError(this.getNode(), error);
|
||||
}
|
||||
Object.keys(portals).forEach((portal) => {
|
||||
returnData.push({
|
||||
@@ -700,7 +700,7 @@ export class FileMaker implements INodeType {
|
||||
try {
|
||||
token = await getToken.call(this);
|
||||
} catch (error) {
|
||||
throw new NodeOperationError(this.getNode(), `Login fail: ${error}`);
|
||||
throw new NodeOperationError(this.getNode(), new Error('Login fail', { cause: error }));
|
||||
}
|
||||
|
||||
let requestOptions: OptionsWithUri;
|
||||
|
||||
Reference in New Issue
Block a user