diff --git a/src/processTelegram.ts b/src/processTelegram.ts index 08f5fa3..a8597fe 100644 --- a/src/processTelegram.ts +++ b/src/processTelegram.ts @@ -1,9 +1,7 @@ import dotenv from 'dotenv' -import { Client, Database, Query } from 'node-appwrite' +import { Query } from 'node-appwrite' import { DataPointType } from 'dptlib/lib/DataPointType' -import { DPT } from 'dptlib/lib/definitions' import { database } from './appwrite' -import type { Models } from 'node-appwrite' import { DPTAndAddressID, MetricDocument } from './definitions' @@ -32,7 +30,7 @@ export async function getDPTforAddress(destinationAddress: string): Promise { } else { logger.error('%j', list_items) - throw 'Multiple entries!' + throw new Error('Multiple entries!') } } @@ -134,6 +132,6 @@ export async function upsert1(entry: any) { } } else { - throw 'Multiple entries!' + throw new Error('Multiple entries!') } } \ No newline at end of file