Close connection on exception even before request is processed