I struggled with server side response codes. I had a form and it’s server action I had a query, if that query returned 0 results, i needed the submit to return an error.
Using google, most of what I found were people asking my question about the “response” properties and answers just being “It’s not in json format”. These weren’t helpful. I couldn’t find references for it in documentation.
Realizing the response was setup to return html response codes (like 403, 404, 200, etc). I finally found this community forum entry where it lined up response codes to wappler: HTTP Status Code to app connect name mappings
Here is the MDN reference page for response codes: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses
I wanted to trigger on an error, so my response properties looks like this:
On my form, I add the dynamic event from server connect, selected Error and use a the browser function to display an alert. My only issue remaining is this alert will generate any time there is an error and not just the one I added for response.
If you’re struggling with using the response and are new to programming I hope this helps.