mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
🐛 Fix error when checking if webhook exists (#1129)
* 🐛 Fix error when checking if webhook exists
* zap: Small fix
This commit is contained in:
@@ -24,7 +24,7 @@ export async function shopifyApiRequest(this: IHookFunctions | IExecuteFunctions
|
||||
throw new Error('No credentials got returned!');
|
||||
}
|
||||
const headerWithAuthentication = Object.assign({},
|
||||
{ Authorization: ` Basic ${Buffer.from(`${credentials.apiKey}:${credentials.password}`).toString(BINARY_ENCODING)}` });
|
||||
{ Authorization: `Basic ${Buffer.from(`${credentials.apiKey}:${credentials.password}`).toString(BINARY_ENCODING)}` });
|
||||
|
||||
const options: OptionsWithUri = {
|
||||
headers: headerWithAuthentication,
|
||||
@@ -47,6 +47,7 @@ export async function shopifyApiRequest(this: IHookFunctions | IExecuteFunctions
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
} catch (error) {
|
||||
console.log(error.response.body);
|
||||
if (error.response.body && error.response.body.errors) {
|
||||
let message = '';
|
||||
if (typeof error.response.body.errors === 'object') {
|
||||
|
||||
Reference in New Issue
Block a user