I am calling remote actions which call external services. These external services are called in synchronous manner using web services callout. Are there any best practices around how to handle exception scenarios like when services do not return any response.

1 Answer 1


The best practice for exception handling will be showing a toast or error message on time out and this can be captured on the callback

Since JavaScript remoting you can check for errors in the callback .

                    function(result, event){
                        if (event.status) {

                        } else {
                            //show a toast
                    {escape: false}

Also you can set exception message from apex by throwing exception and then showing on front end via Toast .Also you can specify time out value

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .