What does Response SC action do? To send back a message from a Server Connect action?

I have a condition in my Server Connect action which check the submitted info. If it meets the condition then the rest happens fine. However, in my ‘else’ section I want nothing to happen but a message be shown to the visitor to say it failed.

I’ve seen a ‘Response’ action but am not sure if that’s the right thing to use or how to use it.

Or should I do something in the ‘Catch’ section instead? If so, what?

I like the way the validator works - it allows a notification message to show to the user. I want to do much the same but as part of my ‘else’ section.

I’ve tried to find info here before posting this but been unable to.

1 Like

I’ve even searched DMXZone to see how Response works but there’s nothing there, either :frowning:

Response send the http status code back to your client side.

Normal http status code is 200 meaning all fine.

But you can send a custom one - following the http codes standards and indeed to something with it.

In app connect client side some of the http codes already trigger the special events in the server connect component.

200 - triggers the success event
401 - unauthorized
500 - error

See https://restfulapi.net/http-status-codes/

1 Like

Brilliant. Thanks for that. I’ve now utilised it perfectly.

Screenshot 2020-03-13 at 19.26.51

1 Like