Throwing the HTTPException correctly

Found a small bug.