Added timeout error handling in ajaxHandler.

Change-Id: I002897cf980e9896923370f318812b59b8a8b5ed