mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
⚡ small improvements
This commit is contained in:
@@ -13,7 +13,7 @@ export async function gumroadApiRequest(this: IHookFunctions | IExecuteFunctions
|
||||
if (credentials === undefined) {
|
||||
throw new Error('No credentials got returned!');
|
||||
}
|
||||
body = Object.assign({ access_token: credentials.accessToken }, body)
|
||||
body = Object.assign({ access_token: credentials.accessToken }, body);
|
||||
|
||||
let options: OptionsWithUri = {
|
||||
method,
|
||||
@@ -30,9 +30,9 @@ export async function gumroadApiRequest(this: IHookFunctions | IExecuteFunctions
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
} catch (error) {
|
||||
let errorMessage = error
|
||||
let errorMessage = error;
|
||||
if (!error.success) {
|
||||
errorMessage.message
|
||||
errorMessage.message;
|
||||
}
|
||||
throw new Error('Gumroad Error: ' + errorMessage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user