catch exception during HTTP exchange