Home > @imqueue/rpc > imqCallRejector
imqCallRejector() function
Builds a call rejector that rejects the pending promise and then runs the optional after-call hook.
Signature:
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 |
the originating request message | |
|
client |
the client the call belongs to {(err: any, res?: IMQRPCResponse) => void} - a hook-aware rejector |
Returns:
(err: any, res?: IMQRPCResponse) => void