Handle timeout error returned from Apache server due to the ProxyTimeout.
We have Apache reverse proxy server and set up a ProxyTimeout as 300 seconds.
When an Ajax request is lasting more than 300 seconds, a 500 error is returned from Apache server, but the Pega platform code is not showing any information to the end user who can only see a busy indicator loading forever.
Is there any OOTB approach as a best practice to config it?
We found one potential solution that if we override this function "window.ajaxRequestFail" from UserWorkform then we can customize the error behavior after receiving the 500 error, but we are not sure if it's okay to do so.
Does anyone have the experience of working on this?
// Set to 0 to prevent the retry when 500 error received
pega.u.d.ajaxFailureCount=0;
// Override the ajaxRequestFail to customize the error behavior
window.ajaxRequestFail = function(res){
if (res && (res.status === 500 || res.status === 504)) {
ShowMessage("There has been an issue;\r\n please consult your system administrator", "e");
}
//console.error("ajaxRequestFail");
}