added try/catch exception for http requests