500, 504 service errors on ajax calls
Hi,
I have an AEM servlet which in turn call google recaptcha web service.
Application makes an ajax call to AEM Servlet and google recaptcha inside the servlet.
Sometimes, google recaptcha server is not reachable and code is throwing HttpHostConnectException ( connection timeout, 500 , 504 service errors thrown) and application hangs.
I do have catch block with IOException and I do see logs with exception stacktrace.
Question : Why does application hangs, even though I am handling the exception?
Question : Is there any way to come out of this and let the application flow , rather than hang ( on front end ajax call or on AEM Server level configuration ??)
Thanks,
Sri