Do not set cache on response if an exception was raised