From b28cf0c15bd30aa40355c4bc37a7ce4139b0cbe8 Mon Sep 17 00:00:00 2001 From: JosephVolosin Date: Mon, 9 Dec 2024 09:36:39 -0500 Subject: [PATCH] e as Error => (e as Error).message --- src/packages/external-source/external-source.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/packages/external-source/external-source.ts b/src/packages/external-source/external-source.ts index 115877a..350b248 100644 --- a/src/packages/external-source/external-source.ts +++ b/src/packages/external-source/external-source.ts @@ -225,12 +225,12 @@ async function uploadExternalSource(req: Request, res: Response) { } catch (e) { logger.error( `POST /uploadExternalSourceEventTypes: Body of request must be a JSON, with two stringified properties: "source" and "events". Alternatively, parsing may have failed:\n${ - e as Error + (e as Error).message }`, ); res.status(500).send({ message: `Body of request must be a JSON, with two stringified properties: "source" and "events". Alternatively, parsing may have failed:\n${ - e as Error + (e as Error).message }`, }); return; @@ -249,6 +249,7 @@ async function uploadExternalSource(req: Request, res: Response) { valid_at: valid_at, }, }; + console.log(period); const headers: HeadersInit = { Authorization: authorizationHeader ?? '', @@ -282,7 +283,7 @@ async function uploadExternalSource(req: Request, res: Response) { logger.error( `POST /uploadExternalSourceEventTypes: The source and event types in your source do not exist in the database.`, ); - res.status(500).send({ message: `The source and event types in your source do not exist in the database.` }); + res.status(500).send({ message: `The source type and event types in your source do not exist in the database.` }); return; }