Bug Report: Custom API Request module strips native false/null variables causing malformed JSON
Status: Open · Asked by Raphael Vaugan on · 0 views
Hello Pabbly Support Team,
I am reporting a parsing bug within the "Custom API Request" action module. When mapping a native false or null variable into a raw JSON body, the text parser treats the variable as an empty void and strips it entirely from the payload, resulting in malformed JSON.
Steps to reproduce:
- Create a "Code by Pabbly" step that outputs a native boolean false or a native null.
- Add a "Custom API Request" action.
- In the Data (Raw JSON) field, map the output from the code step without quotation marks to pass the native data type.
Example: "opt_in_newsletter": {{variable_false}} - Run a test execution.
Expected behavior:
The module should serialize the native value and compile the JSON as:
"opt_in_newsletter": false
Actual behavior:
The module omits the variable entirely, leaving a syntax error in the compiled JSON:
"opt_in_newsletter": ,
Impact:
This invalid syntax causes strict API endpoints to reject the request with a 400 Bad Request error. The only current workaround is to build and stringify the entire JSON payload via JSON.stringify() within a JavaScript step, which defeats the purpose of the visual mapping interface in the Custom API Request module.
Please investigate the text parser behavior for this specific module so it correctly converts native false and null inputs into text rather than deleting them.
Hi @Bougainvillus,
Could you please share a Task History ID where the Code (Pabbly) step 3 returned false in the Output News field, so we can look into the issue? The Task History ID you shared contains true in the Output News field.
Task History ID: IjU3NjYwNTZjMDYzNjA0MzA1MjY0NTUzNDUxMzU1MTYyNTQzNzBmMzYi_pc
Thanks & Regards,
Arshil Ahmad
Customer Support Associate
? Pabbly.com