Studio IF action failing on string comparison with REST Proxy response

Running into a weird issue with my flow logic. I have a that calls an external API using the REST Proxy action. The response comes back fine, I can see the JSON payload in the debug logs. The goal is to branch based on a specific status code returned in that JSON.

Here is the structure:

GETRESTPROXY("ExternalAPI", "CheckStatus", {}, "ResponseJSON")
ASSIGN("StatusValue", JSON_EXTRACT(ResponseJSON, "status_code"))

IF(StatusValue == "200")
 SET("FlowPath", "Success")
ELSE
 SET("FlowPath", "Retry")
ENDIF

The problem is the IF condition never evaluates to true, even when the response clearly contains "status_code": "200". The flow always goes to the ELSE block. I’ve tried comparing it as a string '200' and as a number 200, but no luck.

I added a debug log right after the ASSIGN to print the StatusValue variable. It prints 200 without quotes. So it looks like a string in the log output, but maybe it’s being cast to an integer internally? Or maybe JSON_EXTRACT is returning something with hidden whitespace?

I also tried trimming the value:

ASSIGN("CleanStatus", TRIM(StatusValue))
IF(CleanStatus == "200")

Still fails. The debug log shows the variable is definitely populated. It’s not null. It’s not empty. Just the comparison logic seems broken. Is there a known type mismatch issue with IF actions when comparing values extracted from JSON? Or am I missing a step to cast the variable type explicitly before the comparison?

Here is the raw response body I’m parsing:

{
 "status_code": "200",
 "message": "OK",
 "data": null
}

Any ideas on how to force the IF action to evaluate this correctly? I’ve checked the syntax in the documentation and it looks standard. Maybe the REST Proxy action is modifying the payload before it hits the ASSIGN?