We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb64ae8 commit be44186Copy full SHA for be44186
m365-developer-proxy-plugins/MockResponses/MockResponsesLoader.cs
@@ -51,6 +51,12 @@ public void InitResponsesWatcher() {
51
}
52
53
string path = Path.GetDirectoryName(_responsesFilePath) ?? throw new InvalidOperationException($"{_responsesFilePath} is an invalid path");
54
+ if (!File.Exists(_responsesFilePath)) {
55
+ _logger.LogWarn($"File {_configuration.MocksFile} not found. No mocks will be provided");
56
+ _configuration.Responses = Array.Empty<MockResponse>();
57
+ return;
58
+ }
59
+
60
_watcher = new FileSystemWatcher(Path.GetFullPath(path));
61
_watcher.NotifyFilter = NotifyFilters.CreationTime
62
| NotifyFilters.FileName
0 commit comments