Function: withSiteOperation()
withSiteOperation(
operationName:string,operation: () =>Promise<void>,deps:SiteOperationsDependencies,options?:SiteOperationOptions):Promise<void>
Defined in: src/stores/sites/utils/operationHelpers.ts:346
Wraps a site operation with consistent logging, error handling, and optional sync. Eliminates duplication of the common pattern used across all site operations.
Parametersโ
operationNameโ
string
Name of the operation for logging and error handling.
operationโ
() => Promise<void>
The async operation to execute.
depsโ
Site operation dependencies.
options?โ
Optional execution settings including telemetry metadata and sync toggle.
Returnsโ
Promise<void>
Promise that resolves when operation and optional sync complete.