Catch exception from HTTP client