You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ClinicalScheduler): let OperationCanceledException propagate
The catch filters added in c269ad7 swallowed cancellation alongside
data-access failures, breaking the async cancellation contract: callers
either saw cancellation wrapped as InvalidOperationException or, in
SchedulePermissionService, silently received `false`/empty results that
look like permission denials. Drop OperationCanceledException from the
`when` filters so cooperative cancellation propagates naturally.
Copy file name to clipboardExpand all lines: web/Areas/ClinicalScheduler/Services/PersonService.cs
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ public PersonService(ILogger<PersonService> logger, ClinicalSchedulerContext con
81
81
82
82
returnperson;
83
83
}
84
-
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException or OperationCanceledException)
84
+
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException)
85
85
{
86
86
_logger.LogError(ex,"Error retrieving person data for MothraId: {MothraId}",LogSanitizer.SanitizeId(mothraId));
87
87
thrownewInvalidOperationException($"Failed to retrieve person data for MothraId {LogSanitizer.SanitizeId(mothraId)}",ex);
@@ -139,7 +139,7 @@ public async Task<List<ClinicianYearSummary>> GetCliniciansByYearAsync(int year,
139
139
_logger.LogInformation("Found {ClinicianCount} clinicians for year {Year} with person names from vPerson view",clinicians.Count,year);
140
140
returnclinicians;
141
141
}
142
-
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException or OperationCanceledException)
142
+
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException)
143
143
{
144
144
_logger.LogError(ex,"Error retrieving clinicians for year: {Year}",year);
145
145
thrownewInvalidOperationException($"Failed to retrieve clinicians for grad year {year}. Check database connectivity and view permissions.",ex);
@@ -209,7 +209,7 @@ public async Task<List<ClinicianSummary>> GetCliniciansByGradYearRangeAsync(int
209
209
_logger.LogError(ex,"Database error retrieving clinicians for grad year range {StartYear}-{EndYear}",LogSanitizer.SanitizeYear(startGradYear),LogSanitizer.SanitizeYear(endGradYear));
210
210
thrownewInvalidOperationException($"Database error retrieving clinicians for grad year range {LogSanitizer.SanitizeYear(startGradYear)}-{LogSanitizer.SanitizeYear(endGradYear)}",ex);
211
211
}
212
-
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException or OperationCanceledException)
212
+
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException)
213
213
{
214
214
_logger.LogError(ex,"Error retrieving clinicians for grad year range {StartYear}-{EndYear}",LogSanitizer.SanitizeYear(startGradYear),LogSanitizer.SanitizeYear(endGradYear));
215
215
thrownewInvalidOperationException($"Failed to retrieve clinicians for grad year range {LogSanitizer.SanitizeYear(startGradYear)}-{LogSanitizer.SanitizeYear(endGradYear)}",ex);
@@ -240,7 +240,7 @@ public async Task<List<string>> GetAllMothraIdsAsync(CancellationToken cancellat
240
240
_logger.LogInformation("Found {Count} unique MothraIds in Clinical Scheduler data",mothraIds.Count);
241
241
returnmothraIds;
242
242
}
243
-
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException or OperationCanceledException)
243
+
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException)
Copy file name to clipboardExpand all lines: web/Areas/ClinicalScheduler/Services/ScheduleAuditService.cs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ public async Task<List<ScheduleAudit>> GetInstructorScheduleAuditHistoryAsync(
115
115
.OrderByDescending(a =>a.TimeStamp)
116
116
.ToListAsync(cancellationToken);
117
117
}
118
-
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException or OperationCanceledException)
118
+
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException)
119
119
{
120
120
_logger.LogError(ex,"Error retrieving audit history for instructor schedule {ScheduleId}",instructorScheduleId);
121
121
thrownewInvalidOperationException($"Failed to retrieve audit history for instructor schedule {instructorScheduleId}. Please try again or contact support if the problem persists.",ex);
@@ -135,7 +135,7 @@ public async Task<List<ScheduleAudit>> GetRotationWeekAuditHistoryAsync(
135
135
.OrderByDescending(a =>a.TimeStamp)
136
136
.ToListAsync(cancellationToken);
137
137
}
138
-
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException or OperationCanceledException)
138
+
catch(Exceptionex)when(exisDbUpdateException or SqlException or InvalidOperationException)
139
139
{
140
140
_logger.LogError(ex,"Error retrieving audit history for rotation {RotationId}, week {WeekId}",rotationId,weekId);
141
141
thrownewInvalidOperationException($"Failed to retrieve audit history for rotation {rotationId}, week {weekId}. Please try again or contact support if the problem persists.",ex);
0 commit comments