I am performing a call from Salesforce to the DWH. Rarely, I would exceed the 120000 time limit, but when we do, the user would be presented with a default apex error. I would like to capture that and instead present them with a user friendly error. I am not sure how I can capture that event. How can I say if time limit is exceeded then show an error.
Http http = new Http(); HttpRequest request = new HttpRequest(); request.setTimeout(30000);//30000 request.setEndpoint('https://testURL');