Handle http exceptions