Trap HTTP exception.