@idpass/data-collect-core / FaultRule
Interface: FaultRule
Defined in: testing/StorageFaultInjector.ts:23
Describes a fault injection rule for a specific operation.
Properties
operation
operation:
string
Defined in: testing/StorageFaultInjector.ts:25
The method/operation name to intercept
failOnCall?
optionalfailOnCall:number
Defined in: testing/StorageFaultInjector.ts:27
Fail on the Nth call (1-based)
alwaysFail?
optionalalwaysFail:boolean
Defined in: testing/StorageFaultInjector.ts:29
Fail on every call
error?
optionalerror:Error
Defined in: testing/StorageFaultInjector.ts:31
Custom error to throw (default: new Error("Injected fault: ${operation}"))
delayMs?
optionaldelayMs:number
Defined in: testing/StorageFaultInjector.ts:33
Add delay in milliseconds before returning the result