mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Deduplicate error handling in nodes (#4319)
* Fix issue with isAxios property * 🥅 Deduplicate errors handeling improve errors for credentials * 🎨 correctly throws error
This commit is contained in:
@@ -17,10 +17,8 @@ export async function lemlistApiRequest(
|
||||
qs: IDataObject = {},
|
||||
option: IDataObject = {},
|
||||
) {
|
||||
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
},
|
||||
headers: {},
|
||||
method,
|
||||
uri: `https://api.lemlist.com/api${endpoint}`,
|
||||
qs,
|
||||
@@ -40,11 +38,7 @@ export async function lemlistApiRequest(
|
||||
Object.assign(options, option);
|
||||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.requestWithAuthentication.call(this,'lemlistApi',options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
return await this.helpers.requestWithAuthentication.call(this, 'lemlistApi', options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user