Page 1 of 1

Custom error handler on webservice timeouts

Posted: Mon Nov 19, 2018 1:23 am
by mushfek0001
Hi,

I was wondering is there any way where I can add a custom prompt for webservice timeouts? I couldn't find it anywhere in the settings or documentation.

Thanks,

Re: Custom error handler on webservice timeouts

Posted: Mon Nov 19, 2018 3:03 pm
by support
Hi,

In the module settings, you customize an error handler by checking the “Show Custom Errors” in the REST module . Enabling this setting will allow you to establish custom timeout error handling for that specific module. You can further adjust webservice timeout settings in application settings.

You can find the documentation for module settings here: https://www.plumvoice.com/docs/fuse/mod ... rrors-rest
Refer to this link for customizing webservice timeout settings: https://www.plumvoice.com/docs/fuse/app ... n-settings

Regards,
Plum Support

Re: Custom error handler on webservice timeouts

Posted: Thu Nov 22, 2018 2:47 am
by mushfek0001
I was actually looking for if there's any HTTP code that's returned or is there any way to extract the info from a REST module that there's been a timeout happened and then prompt something to the user. For instance, if my API server is down so that I can let user know that the system is currently under maintenance etc etc. Is there any way to do it?

Re: Custom error handler on webservice timeouts

Posted: Mon Nov 26, 2018 9:57 am
by support
Hi,

The REST module provides various custom shadow variables. To return a HTTP code on timeout, you may want to use the HTTP code shadow variable that REST module provides. In order to create a prompt on timeout, you may want to use the Evaluate JS module to check the HTTP code and link that module to a Prompt module to return a prompt to the customer based on HTTP code.

For more information on shadow variables and Evaluate JS module please refer to the link below.

Shadow Variable documentation: https://www.plumvoice.com/docs/fuse/shadow_variables
Evaluate JS module documentation: https://www.plumvoice.com/docs/fuse/modules:evaluate-js

Regards,
Plum Support