elsethrownewError('invalid $VCR_MODE, must be "record" or "replay"')
constpolly=newPolly('requests',{
logLevel:'warn',
// If a request's recording is not found, pass-through to the server and record the response.
recordIfMissing:false,
// If false, Polly will throw when attempting to persist any failed requests. A request is considered to be a failed request when its response's status code is ≥ 400.
recordFailedRequests:true,
// Await any unresolved requests handled by the polly instance (via flush) when stop is called.
flushRequestsOnStop:true,
// The Polly mode. Can be one of the following:
// - replay: Replay responses from recordings.
// - record: Force Polly to record all requests. This will overwrite recordings that already exist.
// - passthrough: Passes all requests through directly to the server without recording or replaying.
// When disabled, requests that have not been captured by the running Polly instance will be removed from any previous recording. This ensures that a recording will only contain the requests that were made during the lifespan of the Polly instance. When enabled, new requests will be appended to the recording file.