@ogma/nestjs-module
Version:
A NestJS module for the Ogma logger
21 lines (20 loc) • 958 B
TypeScript
import { ArgumentsHost, ExecutionContext, HttpException } from '@nestjs/common';
import { AbstractInterceptorService } from './abstract-interceptor.service';
export declare abstract class HttpInterceptorService extends AbstractInterceptorService {
getStatus(context: ExecutionContext, inColor: boolean, error?: HttpException | Error): string;
protected determineStatusCodeFromError(error: HttpException | Error): number;
/**
* A helper method to get the response object
* @param context execution context from Nest
* @returns the adapter's response object
*/
getResponse(context: ArgumentsHost): any;
/**
* A helper method to get the request object
* @param context execution context from Nest
* @returns the adapter's request object
*/
getRequest(context: ArgumentsHost): any;
setRequestId(context: ArgumentsHost, requestId: string): void;
getRequestId(context: ArgumentsHost): any;
}