fix: improve error handling in delegation credential workspace configuration (#26985)
- Changed checkIfSuccessfullyConfiguredInWorkspace to throw detailed errors instead of returning boolean - Updated testDelegationCredentialSetup in Google Calendar and Office365 Calendar services to throw specific errors - Updated assertWorkspaceConfigured to let errors propagate naturally - Updated Calendar interface type to reflect Promise<void> return type - Updated CalendarCacheWrapper and CalendarTelemetryWrapper to match new interface Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
04e828358a
commit
2f16758de3
7 files changed
+123
-113
No files matched your search
@@ -214,7 +214,7 @@ export class CalendarCacheWrapper implements Calendar {
|
||||
return this.deps.originalCalendar.listCalendars(event);
|
||||
}
|
||||
|
||||
testDelegationCredentialSetup?(): Promise<boolean> {
|
||||
return this.deps.originalCalendar.testDelegationCredentialSetup?.() || Promise.resolve(false);
|
||||
testDelegationCredentialSetup?(): Promise<void> {
|
||||
return this.deps.originalCalendar.testDelegationCredentialSetup?.() || Promise.resolve();
|
||||
}
|
||||
}
|
||||
@@ -190,7 +190,7 @@ export class CalendarTelemetryWrapper implements Calendar {
|
||||
return this.deps.originalCalendar.listCalendars(event);
|
||||
}
|
||||
|
||||
testDelegationCredentialSetup?(): Promise<boolean> {
|
||||
return this.deps.originalCalendar.testDelegationCredentialSetup?.() || Promise.resolve(false);
|
||||
testDelegationCredentialSetup?(): Promise<void> {
|
||||
return this.deps.originalCalendar.testDelegationCredentialSetup?.() || Promise.resolve();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user