-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Describe the bug
[19:29:01 INF] File change detected
[19:29:01 DBG] Cache invalidated because of TokenExpired
Unhandled Exception: System.IO.FileNotFoundException: Could not find file 'C:\Code\github\natenho\Mockaco\src\Mockaco\Mocks\Claro-M4U-Thundercats\11963641040\ProductsIdGet-200-R$30.json'. at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share) at Mockaco.TemplateFileProvider.<>c__DisplayClass16_1.<LoadTemplatesFromDirectory>b__1() in C:\Code\github\natenho\Mockaco\src\Mockaco\Templating\Providers\TemplateFileProvider.cs:line 105 at Polly.Policy.<>c__DisplayClass108_0.<Execute>b__0(Context ctx, CancellationToken ct) at Polly.Policy.<>c__DisplayClass138_0.<Implementation>b__0(Context ctx, CancellationToken token) at Polly.Retry.RetryEngine.Implementation[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Action4 onRetry, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider)
at Polly.Retry.RetryPolicy.Implementation[TResult](Func3 action, Context context, CancellationToken cancellationToken) at Polly.Policy.Implementation(Action2 action, Context context, CancellationToken cancellationToken)
at Polly.Policy.Execute(Action2 action, Context context, CancellationToken cancellationToken) at Mockaco.TemplateFileProvider.LoadTemplatesFromDirectory()+MoveNext() in C:\Code\github\natenho\Mockaco\src\Mockaco\Templating\Providers\TemplateFileProvider.cs:line 103 at Mockaco.MockProvider.WarmUp() in C:\Code\github\natenho\Mockaco\src\Mockaco\MockProvider.cs:line 67 at Mockaco.MockProvider.TemplateProviderChange(Object sender, EventArgs e) in C:\Code\github\natenho\Mockaco\src\Mockaco\MockProvider.cs:line 42 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ThreadPoolWorkQueue.Dispatch()
To Reproduce
Delete template files. It is not reproducible all the times.
Expected behavior
To not generate errors when deleting templates.