Forum Academy Marketplace Showcase Pricing Features

Server Side Action error management

Hi

I am wondering what is the best way to perform error handling on a server side action script.

I have tried with throw but the exception is not risen in the client events.

    function(properties, context) {

      	throw "I would like to see this as an error on the client."

        // We don't get here anyways.
    	var result = {
            token : 'returned value'
        };

        return result;

    }

Any other ideas?

Kind Regards
Mario

2 Likes

Up ! Anybody have the answer to this question ? :slight_smile:

Server-side exceptions by definition will not be raised on the client side. Why should they? It’s not the clients CPU that is doing the processing. They will show up in the server logs though. The Bubble documentation explicitly cautions against catching and throwing exceptions as their asynchronous implementation relies heavily on error catching logic to delay workflows until all the data is present.