public bool CanSend(OwinEnvironment environment, Exception exception) { if (_settings.ExcludeErrorsFromLocal && environment != null) { var request = new OwinRequest(environment); try { if (request.IsLocal()) { return(false); } } catch { if (_settings.ThrowOnError) { throw; } } } return(CanSend(exception)); }