mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(HTTP Request Tool Node): Fix OAuth2 requests (#14380)
This commit is contained in:
@@ -92,7 +92,7 @@ const genericCredentialRequest = async (ctx: ISupplyDataFunctions, itemIndex: nu
|
|||||||
|
|
||||||
if (genericType === 'oAuth2Api') {
|
if (genericType === 'oAuth2Api') {
|
||||||
return async (options: IHttpRequestOptions) => {
|
return async (options: IHttpRequestOptions) => {
|
||||||
return await ctx.helpers.requestOAuth2.call(ctx, 'oAuth1Api', options, {
|
return await ctx.helpers.requestOAuth2.call(ctx, 'oAuth2Api', options, {
|
||||||
tokenType: 'Bearer',
|
tokenType: 'Bearer',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -777,7 +777,7 @@ export const configureToolFunction = (
|
|||||||
throw new NodeOperationError(ctx.getNode(), 'Binary data is not supported');
|
throw new NodeOperationError(ctx.getNode(), 'Binary data is not supported');
|
||||||
}
|
}
|
||||||
|
|
||||||
response = optimizeResponse(fullResponse.body);
|
response = optimizeResponse(fullResponse.body ?? fullResponse);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
response = `There was an error: "${error.message}"`;
|
response = `There was an error: "${error.message}"`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user