Airthee
November 20, 2023, 5:44pm
1
Describe the problem/error/question
Hi!
I’m building a community node that makes an HTTP request.
When I run my operation that is a POST with “routing” options, I have a 400 error, but I cannot find information about the sent request.
I ran in DEBUG mode but I just see in logs that the request failed.
It does not display the URL, nor the parameters.
Is there a solution to display the request informations?
jan
November 20, 2023, 7:03pm
3
Welcome to the community @Airthee !
You are right, we really have to improve the development experience. A workaround would be adding a preSend
method and then print the requestOptions
in there.
Here an example of a preSend
method:
preSend: [
async function (
this: IExecuteSingleFunctions,
requestOptions: IHttpRequestOptions,
): Promise<IHttpRequestOptions> {
const { body } = requestOptions as GenericValue as JsonObject;
Object.assign(body!, { updateEnabled: true });
return requestOptions;
},