UNPKG

@diy0r/nestjs-rabbitmq

Version:
25 lines (24 loc) 864 B
import { Message, MessagePropertyHeaders } from 'amqplib'; import { IModuleBroker, IRmqErrorHeaders } from '../interfaces'; export declare class RmqErrorGlobalService { private rmQoptions; buildError(error: Error | RMQError): {}; errorHandler(msg: Message): any; private isRMQError; } export declare class RmqErrorService extends RmqErrorGlobalService { private readonly options; constructor(options: IModuleBroker); errorHandler(msg: Message): RMQError; } export declare class RMQError extends Error { message: string; service?: string; status?: number; date?: string; host?: string; constructor(message: string, service?: string, status?: number, host?: string, date?: string); } export declare class RMQErrorHandler { static handle(headers: IRmqErrorHeaders | MessagePropertyHeaders): Error | RMQError; }