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
@@ -180,7 +180,10 @@ export class NocoDB implements INodeType {
|
||||
const responseData = await apiRequest.call(this, requestMethod, endpoint, {}, {});
|
||||
return responseData.list.map((i: IDataObject) => ({ name: i.title, value: i.id }));
|
||||
} catch (e) {
|
||||
throw new NodeOperationError(this.getNode(), `Error while fetching projects! (${e})`);
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
new Error('Error while fetching projects!', { cause: e }),
|
||||
);
|
||||
}
|
||||
},
|
||||
// This only supports using the Project ID
|
||||
@@ -193,7 +196,10 @@ export class NocoDB implements INodeType {
|
||||
const responseData = await apiRequest.call(this, requestMethod, endpoint, {}, {});
|
||||
return responseData.list.map((i: IDataObject) => ({ name: i.title, value: i.id }));
|
||||
} catch (e) {
|
||||
throw new NodeOperationError(this.getNode(), `Error while fetching tables! (${e})`);
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
new Error('Error while fetching tables!', { cause: e }),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
throw new NodeOperationError(this.getNode(), `No project selected!`);
|
||||
|
||||
Reference in New Issue
Block a user