# imqCallRejector() function · @imqueue/rpc

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

Builds a call rejector that rejects the pending promise and then runs the optional after-call hook.

**Signature:**

```typescript
export declare function imqCallRejector(reject: (err: any) => void, req: IMQRPCRequest, client: IMQClient): (err: any, res?: IMQRPCResponse) => void;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| reject | (err: any) => void | the underlying promise rejector |
| req | [IMQRPCRequest](https://imqueue.org/api/rpc/latest/rpc.imqrpcrequest/) | the originating request message |
| client | [IMQClient](https://imqueue.org/api/rpc/latest/rpc.imqclient/) | the client the call belongs to |


**Returns:**

(err: any, res?: [IMQRPCResponse](https://imqueue.org/api/rpc/latest/rpc.imqrpcresponse/)) => void

a hook-aware rejector

