diff --git a/src/controllers/bulkUpload.ts b/src/controllers/bulkUpload.ts index bc1c0d5e5e..ab49368461 100644 --- a/src/controllers/bulkUpload.ts +++ b/src/controllers/bulkUpload.ts @@ -1,6 +1,6 @@ /* eslint-disable global-require, import/no-dynamic-require, @typescript-eslint/no-unused-vars */ +import customLogger from "@rudderstack/integrations-lib/build/structured-logger"; import { client as errNotificationClient } from '../util/errorNotifier'; -import logger from '@rudderstack/integrations-lib'; import { CatchErr, ContextBodySimple } from '../util/types'; // TODO: To be refactored and redisgned @@ -31,7 +31,7 @@ const getReqMetadata = (ctx) => { }; export const fileUpload = async (ctx) => { - logger.debug( + customLogger.debug( 'Native(Bulk-Upload): Request to transformer:: /fileUpload route', JSON.stringify(ctx.request.body), ); @@ -69,7 +69,7 @@ export const fileUpload = async (ctx) => { }); } ctx.body = response; - logger.debug( + customLogger.debug( 'Native(Bulk-Upload): Response from transformer:: /fileUpload route', JSON.stringify(ctx.body), ); @@ -77,7 +77,7 @@ export const fileUpload = async (ctx) => { }; export const pollStatus = async (ctx) => { - logger.debug( + customLogger.debug( 'Native(Bulk-Upload): Request to transformer:: /pollStatus route', JSON.stringify(ctx.request.body), ); @@ -104,7 +104,7 @@ export const pollStatus = async (ctx) => { }); } ctx.body = response; - logger.debug( + customLogger.debug( 'Native(Bulk-Upload): Request from transformer:: /pollStatus route', JSON.stringify(ctx.body), ); @@ -112,7 +112,7 @@ export const pollStatus = async (ctx) => { }; export const getWarnJobStatus = async (ctx) => { - logger.debug( + customLogger.debug( 'Native(Bulk-Upload): Request to transformer:: /getWarningJobs route', JSON.stringify(ctx.request.body), ); @@ -140,7 +140,7 @@ export const getWarnJobStatus = async (ctx) => { }); } ctx.body = response; - logger.debug( + customLogger.debug( 'Native(Bulk-Upload): Request from transformer:: /getWarningJobs route', JSON.stringify(ctx.body), ); @@ -148,7 +148,7 @@ export const getWarnJobStatus = async (ctx) => { }; export const getFailedJobStatus = async (ctx) => { - logger.debug( + customLogger.debug( 'Native(Bulk-Upload): Request to transformer:: /getFailedJobs route', JSON.stringify(ctx.request.body), ); @@ -176,7 +176,7 @@ export const getFailedJobStatus = async (ctx) => { }); } ctx.body = response; - logger.debug( + customLogger.debug( 'Native(Bulk-Upload): Request from transformer:: /getFailedJobs route', JSON.stringify(ctx.body), ); diff --git a/src/controllers/delivery.ts b/src/controllers/delivery.ts index fbd4986845..c06bbd6b6a 100644 --- a/src/controllers/delivery.ts +++ b/src/controllers/delivery.ts @@ -1,6 +1,7 @@ /* eslint-disable prefer-destructuring */ /* eslint-disable sonarjs/no-duplicate-string */ import { Context } from 'koa'; +import customLogger from "@rudderstack/integrations-lib/build/structured-logger"; import { MiscService } from '../services/misc'; import { DeliveriesResponse, @@ -12,7 +13,6 @@ import { import { ServiceSelector } from '../helpers/serviceSelector'; import { DeliveryTestService } from '../services/delivertTest/deliveryTest'; import { ControllerUtility } from './util'; -import logger from '@rudderstack/integrations-lib'; import { DestinationPostTransformationService } from '../services/destination/postTransformation'; import tags from '../v0/util/tags'; import { FixMe } from '../util/types'; @@ -21,7 +21,7 @@ const NON_DETERMINABLE = 'Non-determinable'; export class DeliveryController { public static async deliverToDestination(ctx: Context) { - logger.debug('Native(Delivery):: Request to transformer::', JSON.stringify(ctx.request.body)); + customLogger.debug('Native(Delivery):: Request to transformer::', JSON.stringify(ctx.request.body)); let deliveryResponse: DeliveryResponse; const requestMetadata = MiscService.getRequestMetadata(ctx); const deliveryRequest = ctx.request.body as ProxyDeliveryRequest; @@ -51,12 +51,12 @@ export class DeliveryController { ctx.body = { output: deliveryResponse }; ControllerUtility.deliveryPostProcess(ctx, deliveryResponse.status); - logger.debug('Native(Delivery):: Response from transformer::', JSON.stringify(ctx.body)); + customLogger.debug('Native(Delivery):: Response from transformer::', JSON.stringify(ctx.body)); return ctx; } public static async deliverToDestinationV1(ctx: Context) { - logger.debug('Native(Delivery):: Request to transformer::', JSON.stringify(ctx.request.body)); + customLogger.debug('Native(Delivery):: Request to transformer::', JSON.stringify(ctx.request.body)); let deliveryResponse: DeliveriesResponse; const requestMetadata = MiscService.getRequestMetadata(ctx); const deliveryRequest = ctx.request.body as ProxyDeliveriesRequest; @@ -86,12 +86,12 @@ export class DeliveryController { ctx.body = { output: deliveryResponse }; ControllerUtility.deliveryPostProcess(ctx, deliveryResponse.status); - logger.debug('Native(Delivery):: Response from transformer::', JSON.stringify(ctx.body)); + customLogger.debug('Native(Delivery):: Response from transformer::', JSON.stringify(ctx.body)); return ctx; } public static async testDestinationDelivery(ctx: Context) { - logger.debug( + customLogger.debug( 'Native(Delivery-Test):: Request to transformer::', JSON.stringify(ctx.request.body), ); @@ -112,7 +112,7 @@ export class DeliveryController { ); ctx.body = { output: response }; ControllerUtility.postProcess(ctx); - logger.debug('Native(Delivery-Test):: Response from transformer::', JSON.stringify(ctx.body)); + customLogger.debug('Native(Delivery-Test):: Response from transformer::', JSON.stringify(ctx.body)); return ctx; } } diff --git a/src/controllers/destination.ts b/src/controllers/destination.ts index 34b68b6613..db5ecda4e4 100644 --- a/src/controllers/destination.ts +++ b/src/controllers/destination.ts @@ -1,4 +1,5 @@ import { Context } from 'koa'; +import customLogger from "@rudderstack/integrations-lib/build/structured-logger"; import { MiscService } from '../services/misc'; import { DestinationPreTransformationService } from '../services/destination/preTransformation'; import { DestinationPostTransformationService } from '../services/destination/postTransformation'; @@ -11,7 +12,6 @@ import { import { ServiceSelector } from '../helpers/serviceSelector'; import { ControllerUtility } from './util'; import stats from '../util/stats'; -import logger from '@rudderstack/integrations-lib'; import { getIntegrationVersion } from '../util/utils'; import tags from '../v0/util/tags'; import { DynamicConfigParser } from '../util/dynamicConfigParser'; @@ -19,7 +19,7 @@ import { DynamicConfigParser } from '../util/dynamicConfigParser'; export class DestinationController { public static async destinationTransformAtProcessor(ctx: Context) { const startTime = new Date(); - logger.debug( + customLogger.debug( 'Native(Process-Transform):: Requst to transformer::', JSON.stringify(ctx.request.body), ); @@ -68,7 +68,7 @@ export class DestinationController { } ctx.body = resplist; ControllerUtility.postProcess(ctx); - logger.debug( + customLogger.debug( 'Native(Process-Transform):: Response from transformer::', JSON.stringify(ctx.body), ); @@ -93,7 +93,7 @@ export class DestinationController { public static async destinationTransformAtRouter(ctx: Context) { const startTime = new Date(); - logger.debug( + customLogger.debug( 'Native(Router-Transform):: Requst to transformer::', JSON.stringify(ctx.request.body), ); @@ -140,7 +140,7 @@ export class DestinationController { version: 'v0', ...metaTags, }); - logger.debug( + customLogger.debug( 'Native(Router-Transform):: Response from transformer::', JSON.stringify(ctx.body), ); @@ -154,7 +154,7 @@ export class DestinationController { } public static batchProcess(ctx: Context) { - logger.debug( + customLogger.debug( 'Native(Process-Transform-Batch):: Requst to transformer::', JSON.stringify(ctx.request.body), ); @@ -189,7 +189,7 @@ export class DestinationController { ctx.body = [errResp]; } ControllerUtility.postProcess(ctx); - logger.debug( + customLogger.debug( 'Native(Process-Transform-Batch):: Response from transformer::', JSON.stringify(ctx.body), ); diff --git a/src/controllers/regulation.ts b/src/controllers/regulation.ts index 7c332b6d54..fd3b1b19c4 100644 --- a/src/controllers/regulation.ts +++ b/src/controllers/regulation.ts @@ -1,5 +1,5 @@ import { Context } from 'koa'; -import logger from '@rudderstack/integrations-lib'; +import customLogger from "@rudderstack/integrations-lib/build/structured-logger"; import { UserDeletionRequest, UserDeletionResponse } from '../types'; import { ServiceSelector } from '../helpers/serviceSelector'; import tags from '../v0/util/tags'; @@ -10,7 +10,7 @@ import { CatchErr } from '../util/types'; export class RegulationController { public static async deleteUsers(ctx: Context) { - logger.debug( + customLogger.debug( 'Native(Process-Transform):: Requst to transformer::', JSON.stringify(ctx.request.body), ); @@ -23,7 +23,7 @@ export class RegulationController { rudderDestInfo = destInfoHeader; } } catch (error) { - logger.error(`Error while getting rudderDestInfo header value: ${error}`); + customLogger.error(`Error while getting rudderDestInfo header value: ${error}`); } const userDeletionRequests = ctx.request.body as UserDeletionRequest[]; diff --git a/src/controllers/source.ts b/src/controllers/source.ts index 94260f42ae..9115215e73 100644 --- a/src/controllers/source.ts +++ b/src/controllers/source.ts @@ -1,13 +1,13 @@ import { Context } from 'koa'; +import customLogger from "@rudderstack/integrations-lib/build/structured-logger"; import { MiscService } from '../services/misc'; import { ServiceSelector } from '../helpers/serviceSelector'; import { ControllerUtility } from './util'; -import logger from '@rudderstack/integrations-lib'; import { SourcePostTransformationService } from '../services/source/postTransformation'; export class SourceController { public static async sourceTransform(ctx: Context) { - logger.debug( + customLogger.debug( 'Native(Source-Transform):: Request to transformer::', JSON.stringify(ctx.request.body), ); @@ -34,7 +34,7 @@ export class SourceController { ctx.body = [resp]; } ControllerUtility.postProcess(ctx); - logger.debug( + customLogger.debug( 'Native(Source-Transform):: Response from transformer::', JSON.stringify(ctx.body), ); diff --git a/src/index.ts b/src/index.ts index bc789f0e09..cfdac7fd9e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import Koa from 'koa'; import bodyParser from 'koa-bodyparser'; import gracefulShutdown from 'http-graceful-shutdown'; import dotenv from 'dotenv'; -import logger from '@rudderstack/integrations-lib'; +import customLogger from "@rudderstack/integrations-lib/build/structured-logger"; import cluster from './util/cluster'; import { metricsRouter } from './routes/metricsRouter'; import { addStatMiddleware, addRequestSizeMiddleware, initPyroscope } from './middleware'; @@ -32,13 +32,13 @@ app.use( addRequestSizeMiddleware(app); addSwaggerRoutes(app); -logger.info('Using new routes'); +customLogger.info('Using new routes'); applicationRoutes(app); function finalFunction() { RedisDB.disconnect(); - logger.info('Redis client disconnected'); - logger.error(`Process (pid: ${process.pid}) was gracefully shutdown`); + customLogger.info('Redis client disconnected'); + customLogger.error(`Process (pid: ${process.pid}) was gracefully shutdown`); logProcessInfo(); } @@ -59,15 +59,15 @@ if (clusterEnabled) { const server = app.listen(port); process.on('SIGTERM', () => { - logger.error(`SIGTERM signal received`); + customLogger.error(`SIGTERM signal received`); }); process.on('SIGINT', () => { - logger.error(`SIGINT signal received`); + customLogger.error(`SIGINT signal received`); }); process.on('SIGSEGV', () => { - logger.error(`SIGSEGV - JavaScript memory error occurred`); + customLogger.error(`SIGSEGV - JavaScript memory error occurred`); }); gracefulShutdown(server, { @@ -77,7 +77,7 @@ if (clusterEnabled) { finally: finalFunction, }); - logger.info(`App started. Listening on port: ${port}`); + customLogger.info(`App started. Listening on port: ${port}`); } export default app; diff --git a/src/services/destination/cdkV2Integration.ts b/src/services/destination/cdkV2Integration.ts index fcca2dd116..34270b421c 100644 --- a/src/services/destination/cdkV2Integration.ts +++ b/src/services/destination/cdkV2Integration.ts @@ -67,9 +67,9 @@ export class CDKV2DestinationService implements DestinationService { tags.FEATURES.PROCESSOR, ); metaTo.metadata = event.metadata; - const metadataWithSvcCtx = { + const metadataWithLoggingCtx = { ...requestMetadata, - serviceContext: MiscService.getLoggableData(metaTo.errorDetails), + loggerCtx: MiscService.getLoggableData(metaTo.errorDetails), }; try { const transformedPayloads: @@ -78,7 +78,7 @@ export class CDKV2DestinationService implements DestinationService { destinationType, event, tags.FEATURES.PROCESSOR, - metadataWithSvcCtx, + metadataWithLoggingCtx, ); stats.increment('event_transform_success', { @@ -132,9 +132,9 @@ export class CDKV2DestinationService implements DestinationService { tags.FEATURES.ROUTER, ); metaTo.metadata = destInputArray[0].metadata; - const metadataWithSvcCtx = { + const metadataWithLoggingCtx = { ...requestMetadata, - serviceContext: MiscService.getLoggableData(metaTo.errorDetails), + loggerCtx: MiscService.getLoggableData(metaTo.errorDetails), }; try { const doRouterTransformationResponse: RouterTransformationResponse[] = @@ -142,7 +142,7 @@ export class CDKV2DestinationService implements DestinationService { destinationType, destInputArray, tags.FEATURES.ROUTER, - metadataWithSvcCtx, + metadataWithLoggingCtx, ); return DestinationPostTransformationService.handleRouterTransformSuccessEvents( doRouterTransformationResponse, diff --git a/src/services/destination/nativeIntegration.ts b/src/services/destination/nativeIntegration.ts index 4f8c6e0209..95fe6a7872 100644 --- a/src/services/destination/nativeIntegration.ts +++ b/src/services/destination/nativeIntegration.ts @@ -71,16 +71,16 @@ export class NativeIntegrationDestinationService implements DestinationService { tags.FEATURES.PROCESSOR, ); metaTO.metadata = event.metadata; - const metadataWithSvcCtx = { + const metadataWithLoggingCtx = { ...requestMetadata, - serviceContext: MiscService.getLoggableData(metaTO.errorDetails), + loggerCtx: MiscService.getLoggableData(metaTO.errorDetails), }; try { const transformedPayloads: | ProcessorTransformationOutput | ProcessorTransformationOutput[] = await destHandler.process( event, - metadataWithSvcCtx, + metadataWithLoggingCtx, ); return DestinationPostTransformationService.handleProcessorTransformSucessEvents( event, @@ -121,12 +121,12 @@ export class NativeIntegrationDestinationService implements DestinationService { tags.FEATURES.ROUTER, ); try { - const metadataWithSvcCtx = { + const metadataWithLoggingCtx = { ...requestMetadata, - serviceContext: MiscService.getLoggableData(metaTO.errorDetails), + loggerCtx: MiscService.getLoggableData(metaTO.errorDetails), }; const doRouterTransformationResponse: RouterTransformationResponse[] = - await destHandler.processRouterDest(cloneDeep(destInputArray), metadataWithSvcCtx); + await destHandler.processRouterDest(cloneDeep(destInputArray), metadataWithLoggingCtx); metaTO.metadata = destInputArray[0].metadata; return DestinationPostTransformationService.handleRouterTransformSuccessEvents( doRouterTransformationResponse, @@ -171,14 +171,14 @@ export class NativeIntegrationDestinationService implements DestinationService { tags.FEATURES.BATCH, ); metaTO.metadatas = events.map((event) => event.metadata); - const metadataWithSvcCtx = { + const metadataWithLoggingCtx = { ...requestMetadata, - serviceContext: MiscService.getLoggableData(metaTO.errorDetails), + loggerCtx: MiscService.getLoggableData(metaTO.errorDetails), }; try { const destBatchedRequests: RouterTransformationResponse[] = destHandler.batch( destEvents, - metadataWithSvcCtx, + metadataWithLoggingCtx, ); return destBatchedRequests; } catch (error: any) { @@ -283,7 +283,7 @@ export class NativeIntegrationDestinationService implements DestinationService { const result: UserDeletionResponse = await destUserDeletionHandler.processDeleteUsers({ ...request, rudderDestInfo, - serviceContext: MiscService.getLoggableData(metaTO.errorDetails), + loggerCtx: MiscService.getLoggableData(metaTO.errorDetails), }); stats.timing('regulation_worker_requests_dest_latency', startTime, { feature: tags.FEATURES.USER_DELETION, diff --git a/src/services/misc.ts b/src/services/misc.ts index f8168a8433..f3d01ce4ee 100644 --- a/src/services/misc.ts +++ b/src/services/misc.ts @@ -2,10 +2,10 @@ import fs from 'fs'; import path from 'path'; import { Context } from 'koa'; +import customLogger from '@rudderstack/integrations-lib'; import { DestHandlerMap } from '../constants/destinationCanonicalNames'; import { ErrorDetailer, LoggableExtraData, Metadata } from '../types'; import { getCPUProfile, getHeapProfile } from '../middleware'; -import customLogger from '@rudderstack/integrations-lib'; export class MiscService { public static getDestHandler(dest: string, version: string) { @@ -32,7 +32,7 @@ export class MiscService { namespace: 'Unknown', cluster: 'Unknown', features: ctx.state?.features || {}, - serviceContext: {}, + loggerCtx: {}, }; } diff --git a/src/services/profile.ts b/src/services/profile.ts index 8a73173d6c..f8ac297545 100644 --- a/src/services/profile.ts +++ b/src/services/profile.ts @@ -6,7 +6,7 @@ import v8 from 'v8'; import pprof, { heap } from '@datadog/pprof'; import { promisify } from 'util'; -import logger from '@rudderstack/integrations-lib'; +import customLogger from "@rudderstack/integrations-lib/build/structured-logger"; // eslint-disable-next-line @typescript-eslint/no-unused-vars import { CatchErr } from '../util/types'; @@ -17,8 +17,8 @@ const intervalBytes = parseInt(process.env.PROF_INTERVAL_BYTES || '524288', 10); // The maximum stack depth for samples collected. const stackDepth = parseInt(process.env.PROF_STACK_DEPTH || '64', 10); -logger.info(`Stack Depth set: ${stackDepth}`); -logger.info(`Interval Bytes set: ${intervalBytes}`); +customLogger.info(`Stack Depth set: ${stackDepth}`); +customLogger.info(`Interval Bytes set: ${intervalBytes}`); heap.start(intervalBytes, stackDepth); @@ -44,7 +44,7 @@ export class ProfileService { resolve(Buffer.concat(chunks).toString()); }); readable.on('error', (err) => { - logger.error(err); + customLogger.error(err); reject(err); }); }); @@ -69,7 +69,7 @@ export class ProfileService { }); upload.on('httpUploadProgress', (progress) => { - logger.info(progress); + customLogger.info(progress); }); const uploadResult = await upload.done(); @@ -82,7 +82,7 @@ export class ProfileService { try { const supportedCloudProvidersForDumpStorage = ['aws']; const shouldGenerateLocally = !credBucketDetails.sendTo; - logger.info('Before Heapsnapshot converted into a readable stream'); + customLogger.info('Before Heapsnapshot converted into a readable stream'); let fileName = ''; // eslint-disable-next-line no-param-reassign format = 'pb.gz'; @@ -97,18 +97,18 @@ export class ProfileService { snapshotReadableStream = await pprof.encode(profile); } - logger.info('Heapsnapshot into a buffer'); + customLogger.info('Heapsnapshot into a buffer'); fileName = `heap_${moment.utc().format('YYYY-MM-DD_HH:mm:ss.sss')}.${format}`; let data; if (shouldGenerateLocally) { - logger.info('Before pipeline'); + customLogger.info('Before pipeline'); try { await writeFileProm(fileName, snapshotReadableStream); } catch (error: CatchErr) { - logger.error('Error occurred:', error); + customLogger.error('Error occurred:', error); throw new Error(error); } - logger.info('After pipeline'); + customLogger.info('After pipeline'); } else if (credBucketDetails.sendTo) { if (credBucketDetails.sendTo === 'aws') { data = await this.uploadToAWS(credBucketDetails, fileName, snapshotReadableStream); @@ -121,7 +121,7 @@ export class ProfileService { } } // snapshotReadableStream.destroy(); - logger.info('Success', data); + customLogger.info('Success', data); return { success: true, message: `Generated ${ @@ -129,7 +129,7 @@ export class ProfileService { } with filename: ${fileName}`, }; } catch (error: CatchErr) { - logger.error(error); + customLogger.error(error); return { success: false, message: error.message, diff --git a/src/services/trackingPlan.ts b/src/services/trackingPlan.ts index 05d91595bd..f5b3bcccfa 100644 --- a/src/services/trackingPlan.ts +++ b/src/services/trackingPlan.ts @@ -1,4 +1,4 @@ -import logger from '@rudderstack/integrations-lib'; +import customLogger from "@rudderstack/integrations-lib/build/structured-logger"; import { RetryRequestError, RespStatusError, constructValidationErrors } from '../util/utils'; import { getMetadata } from '../v0/util'; import eventValidator from '../util/eventValidation'; @@ -44,7 +44,7 @@ export class TrackingPlanservice { } } catch (error) { const errMessage = `Error occurred while validating : ${error}`; - logger.error(errMessage); + customLogger.error(errMessage); let status = 200; if (error instanceof RetryRequestError) { ctxStatusCode = error.statusCode; diff --git a/src/services/userTransform.ts b/src/services/userTransform.ts index 00d65672e0..5d555b36c4 100644 --- a/src/services/userTransform.ts +++ b/src/services/userTransform.ts @@ -1,5 +1,6 @@ import groupBy from 'lodash/groupBy'; import isEmpty from 'lodash/isEmpty'; +import customLogger from "@rudderstack/integrations-lib/build/structured-logger"; import { userTransformHandler } from '../routerUtils'; import { UserTransformationLibrary, @@ -16,7 +17,6 @@ import { } from '../util/utils'; import { getMetadata, isNonFuncObject } from '../v0/util'; import { SUPPORTED_FUNC_NAMES } from '../util/ivmFactory'; -import logger from '@rudderstack/integrations-lib'; import stats from '../util/stats'; import { CommonUtils } from '../util/common'; // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -76,7 +76,7 @@ export class UserTransformService { if (!transformationVersionId) { const errorMessage = 'Transformation VersionID not found'; - logger.error(`[CT] ${errorMessage}`); + customLogger.error(`[CT] ${errorMessage}`); transformedEvents.push({ statusCode: 400, error: errorMessage, @@ -141,7 +141,7 @@ export class UserTransformService { transformedEvents.push(...transformedEventsWithMetadata); } catch (error: CatchErr) { - logger.error(error); + customLogger.error(error); let status = 400; const errorString = error.toString(); if (error instanceof RetryRequestError) { @@ -198,7 +198,7 @@ export class UserTransformService { throw new Error('Invalid request. Missing events'); } - logger.debug(`[CT] Test Input Events: ${JSON.stringify(events)}`); + customLogger.debug(`[CT] Test Input Events: ${JSON.stringify(events)}`); // eslint-disable-next-line no-param-reassign trRevCode.versionId = 'testVersionId'; response.body = await userTransformHandler()( @@ -208,7 +208,7 @@ export class UserTransformService { trRevCode, true, ); - logger.debug(`[CT] Test Output Events: ${JSON.stringify(response.body.transformedEvents)}`); + customLogger.debug(`[CT] Test Output Events: ${JSON.stringify(response.body.transformedEvents)}`); response.status = 200; } catch (error: CatchErr) { response.status = 400; diff --git a/src/util/error-extractor/index.ts b/src/util/error-extractor/index.ts index 68ebac9aca..ad75672af5 100644 --- a/src/util/error-extractor/index.ts +++ b/src/util/error-extractor/index.ts @@ -22,6 +22,7 @@ export class ErrorDetailsExtractorBuilder { messageDetails: MessageDetails; stat: Stat; + constructor() { this.status = 0; this.messageDetails = {};