Added utility function SetResponseCallback() to set the call back and set exception (promise) in case of timeout