cleanup http error using a new scope