Home > @imqueue/rpc > IMQError

IMQError() function

Builds a JSON representation of an IMQ error.

Signature:

export declare function IMQError(code: string, message: string, stack: any, method: any, args: unknown, original?: unknown): IMQRPCError;

Parameters

Parameter

Type

Description

code

string

error code

message

string

error message

stack

any

error stack

method

any

IMQ service method that produced the error

args

unknown

arguments passed to the service method call

original

unknown

(Optional) original error thrown (JSON-serialized), if any {IMQRPCError}

Returns:

IMQRPCError