Deployed actions returns error - The response block was not set correctly

Hi guys,

I am testing proxy APIs for my smoke test. I have created a Flow module that verifies 200 ok status and returns the JSON response. then I have used the same flow module inside an action which sends the same output to response block of action.

Issue - When the same action is deployed and run I get below error -

{

"runId": "42a629e72d202dc0d8b61854e15df97f",

“status”: “error”,

“message”: “The response block was not set correctly.”,

“details”: {

“_errors”: [

“Expected object, received null”

    \]

}

}

is this API accessible from the public internet?

Hi Rodric,

It worked the first time. I was able to run the actions through collection runner and Newman as well.

But next day I started getting this error and since then I am not able to guess what is causing this error

Hi @shubhankar-bhardwaj

Did you make any changes or it just stopped working? Are you able to run it again today and see if it’s still failing?

If it’s still failing can you show us how your response block is setup in the flow and if you have multiple of them?

HI @flows-daniel

I haven’t changed anything it just stopped working. I have run it a couple of times but get the same issue. Today it has started working again.

PFA ss -

This is the action and its response block

This is the deployed action with its output, not sure how its working now -

Hi @shubhankar-bhardwaj

Glad to hear it’s working now. We had a bug that was causing issues with modules running in deployed actions which we fixed, so everything should work now going forward.

Let us know if you run into any more issues.

Hi @flows-daniel,

I’m facing the same issue. I’m trying to run a flow that I’ve deployed but it doesn’t run when calling the endpoint but when I try testing it using the manual run on post man it does
I get the same error

“message”: “The response block was not set correctly.”,

"details": {

“_errors”: [

“Expected object, received null”

    \]

Hi @moataz-6c2867ab

Are you running this flow with the exact same scenario and payload when invoking it via API?

Also in your screenshot you’re running it locally if you press the up arrow icon next to the run button and theres a cloud run slider you can check. If your APIs aren’t reachable by our cloud environment (due to being private / behind VPN etc.) then your “Try” block will fail and you can end up with this error.

Hi @flows-daniel
Yes, I’m running it with the exact same scenario and payload here
I also enabled cloud run

Hi @moataz-6c2867ab

Can you check the analytics tab for when you call the flow url and see what your Try block is showing? Docs on that are here

I suspect something is going wrong in your Try flow when it’s being run in the cloud and that’s causing it to not reach the response block. Some common issues are if you have http request blocks in that flow that rely on environment variables that aren’t synced to the cloud or you’re trying to update an environment variable that you need from a pre/post request script.

Yes! It was the env. variables
Thank you