Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 86
RE1-T46 bug fixes#296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
RE1-T46 bug fixes #296
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -36,10 +36,11 @@ public T Retrieve<T>(string cacheKey, Func<T> fallbackFunction, TimeSpan expirat | ||
| if (cacheValue.HasValue) | ||
| data = ObjectSerialization.Deserialize<T>(cacheValue); | ||
| } | ||
| catch | ||
| catch (Exception deserializeEx) | ||
| { | ||
| Remove(SetCacheKeyForEnv(cacheKey)); | ||
| throw; | ||
| Logging.LogException(deserializeEx); | ||
| Remove(cacheKey); | ||
| data = null; | ||
| } | ||
| if (data != null) | ||
| @@ -111,10 +112,11 @@ public async Task<T> RetrieveAsync<T>(string cacheKey, Func<Task<T>> fallbackFun | ||
| if (cacheValue.HasValue) | ||
| data = ObjectSerialization.Deserialize<T>(cacheValue); | ||
| } | ||
| catch | ||
| catch (Exception deserializeEx) | ||
| { | ||
| await RemoveAsync(SetCacheKeyForEnv(cacheKey)); | ||
| throw; | ||
| Logging.LogException(deserializeEx); | ||
| await RemoveAsync(cacheKey); | ||
| data = null; | ||
| } | ||
coderabbitai[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| if (data != null) | ||
| @@ -157,7 +159,7 @@ public async Task<bool> SetStringAsync(string cacheKey, string value, TimeSpan e | ||
| if (Config.SystemBehaviorConfig.CacheEnabled && _connection != null && _connection.IsConnected) | ||
| { | ||
| cache = _connection.GetDatabase(); | ||
| if (value != null && cache != null) | ||
| { | ||
| try | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -201,7 +201,7 @@ public async Task<IEnumerable<Log>> GetAllLogsByDepartmentIdYearAsync(int depart | ||
| { | ||
| var dynamicParameters = new DynamicParametersExtension(); | ||
| dynamicParameters.Add("DepartmentId", departmentId); | ||
| dynamicParameters.Add("Year", int.Parse(year)); | ||
| dynamicParameters.Add("Year", int.TryParse(year, out var parsedYear) ? parsedYear : DateTime.UtcNow.Year); | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't substitute malformed Line 204 turns invalid input into a valid-but-wrong filter. Because Prefer failing validation upstream, or at minimum only apply a fallback for 🤖 Prompt for AI Agents | ||
| var query = _queryFactory.GetQuery<SelecAllLogsByDidYearQuery>(); | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.