# initError() function · @imqueue/pg-cache

Source: https://imqueue.org/api/pg-cache/latest/pg-cache.initerror/
Published: 2026-08-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-cache 5.0.6 — generated reference, not hand-written

Reports that a cached method ran before the cache existed — the service was decorated but `start()` has not completed, so there is nothing to read or write. The method still executes; it is simply not cached.

**Signature:**

```typescript
export declare function initError(logger: ILogger, className: string, methodName: string, decorator: Function): void;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| logger | [ILogger](https://imqueue.org/api/pg-cache/latest/pg-cache.ilogger/) | logger to report through |
| className | string | service class whose cache is missing |
| methodName | string | cached method that was called too early |
| decorator | Function | decorator that found the cache absent |


**Returns:**

void

