I’d like to resurrect this request.
Just to be clear and to give some use cases:
What I’m asking for:
When a server connect runs on a page, I would like to be able to set default actions that happen on success, error, unauthorised, forbidden etc. for ANY SC that is on that page. These, like most dynamic events could be simple actions or inline-flows.
Why do I want it?
There’s several things I’d like to do which could save immense amounts of time and duplication of effort.
Standard error notifications - if any server connect returns an error, show a notification/toast to the user . This maybe for a 500 response but could also be used with success where an ‘error’ value has been set in the API file and returned as data in the response (using a condition to show the notification/toast if present). In the case of 200 but some kind of other ‘error’, I’d like to use a Set value step (with the same name in any file such as api_error) that has a user-friendly message to be displayed.
Standard success notifications - if any server connect returns as successful show a notification/toast to the user with a message returned as a value in the API file. I’d like to use a Set value step (with the same name in any file such as api_success) that has a user-friendly message to be displayed.
Standard redirection if unauthorised/forbidden - in addition to the page restrict function, this could help when a page is stayed on by the user so page restrict still thinks the user is authorised but maybe their login has timed out or they are trying to access something they no longer have permission to access.