Forums

CURL doesn't activate FAIL portion despite 401 response

J
JDMIS posted Mar 14, 2023 at 06:11
#399997
Hi, could you help me on this issue:

Scenario:CF form submitted 

Submit Action includes
CURL Module calling a URL     
Expected Response:   HTTP 200   (success)     
Success Action includes Email and other modules      

Expected Response: HTTP 401 (access denied - error)     
Failure action includes friendly error message to user

Form Submits,    CURL IS CALLED,   CONFIRM CURL RESPONDS WITH 401 HTTP STATUS  
BUT!!! CUrl Module STILL RUNS SUCCESS branch!   This is obviously undesirable. 

How do I get CURL to branch properly based on the HTTP status?    Or if it cannot, how to I TRIGGER the FAILURE portion of the branch?

Thank you!
Tuan

Max_admin posted Mar 23, 2023 at 15:11
#400036
In Chronoforms v7 this is working as you want.

But in v6 it has this issue, and it's not possible to change this behavior as it may affect other users.

You may install v7 on the same website and create this form only in v7

or you may use a switch action:
{var:curl_action_name.http_code} check if this == 200
Max ChronoForms developer...
You need to login to be able to post a reply.

 2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for
goods and services provided by ChronoEngine.com