Post Action not Sending Despite 'When' Condition Passing

I am implementing cookies on user login in my application.
I have a workflow that reads a cookie and submits a POST request with the cookie value, when the cookie value is not empty.

This POST request is not being sent, despite the cookie value not being empty.

The first screenshot below confirms that the cookie has a value which is being properly read by the workflow.

The next screenshot below confirms that the POST request was not sent, by showing all the values expected from the request as empty. I have also confirmed on my DEV server that the request was never sent, so this isn’t a case of having mismatched data schemas.

Has anyone experienced a similar issue and know how to resolve?

Can you check in logs or console logs if you have any error or results?
IT doesn’t mean that the request didn’t work (POST), but the returned answer didn’T contain an ID (in some API, the API will response 200 but have an error message inside and didn’t process the request because of this. Bubble will not know this is an error (like if a server return 40X error). So the best thing first is to check in your Logs and activate HTTP request/response

1 Like

I apologize for the delayed reply. I spent some time working on an alternative feature.

I have my DEV server logging all incoming requests, and it does not receive a POST request.
This is certainly an issue with the request firing and not with reading the response.

Use step by step debug mode to see what happen. Also try the request by sending it to a requestbin instead

So I removed the WHEN condition from above, and now the request is sent, but still have the same root problem… the debugger says that the POST body has a value, but when the request is sent it is evaluated as NULL.

I’ve been using the debug mode similarly to above.
As you can see from the first image, the (body) cookie has a value when the POST request step is reached.
However, my server is receiving this value as NULL.

Are there any limitations / reserved names for variables in the body of POST requests?

For additional context, I have posted 2 photos below. The first is proof of the post request hitting the server, and the second is the post request body logged out from a statement I added, followed by the cookie value logged out after parsing.

Upon further experimentation, it turns out that the request is ALWAYS sending the default value, even when the dynamic value that I am inserting has its own value.

I am defining my parameter in the POST request body as below:
“cookie”: “< cookie >”

Using <> to wrap a dynamic value as per the instructions of the API Connector.

1 Like

For those who might happen upon this thread, the underlying issue is that the API Connector is overriding my dynamic parameter “cookie” with the testing value defined in the parameter definition section of my API definition.

The debugger is also showing me a request body which includes the proper dynamic values, prior to this value being overwritten, and the request being sent.
For this, I have created a more focused thread, where I hope to receive a solution or at least draw attention to the bug in the debugger.

If you believe you are having a related issue, please see the above thread.

This topic was automatically closed after 14 days. New replies are no longer allowed.