Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix: Remove non-existent ImportError import

Blue Mousedf185afc826b
diff --git a/backend/apps/community/src/data-import/mappers/fathom.mapper.ts b/backend/apps/community/src/data-import/mappers/fathom.mapper.ts
index f74c72122..55c578f7c 100644
--- a/backend/apps/community/src/data-import/mappers/fathom.mapper.ts
+++ b/backend/apps/community/src/data-import/mappers/fathom.mapper.ts
@@ -1,11 +1,7 @@
import * as fs from 'fs'
import { parse } from 'csv-parse'
-import {
- ImportMapper,
- ImportError,
- AnalyticsImportRow,
-} from './mapper.interface'
+import { ImportMapper, AnalyticsImportRow } from './mapper.interface'
import {
normalizeNull,
truncate,
@@ -45,7 +41,7 @@ function detectFileType(headers: string[]): {
const missing = COMMON_REQUIRED.filter((c) => !normalized.includes(c))
if (missing.length > 0) {
- throw new ImportError(
+ throw new Error(
`CSV does not appear to be a Fathom Analytics export. Missing required columns: ${missing.join(', ')}.`,
)
}
@@ -58,7 +54,7 @@ function detectFileType(headers: string[]): {
return { type: 'events', normalized }
}
- throw new ImportError(
+ throw new Error(
'CSV does not appear to be a Fathom Analytics export. Expected a pageviews export (with "pageviews" column) or an events export (with "event_name" column).',
)
}
@@ -218,7 +214,7 @@ export class FathomMapper implements ImportMapper {
}
if (!headerChecked) {
- throw new ImportError(
+ throw new Error(
'CSV appears empty or is missing a header row. Please upload a CSV export from Fathom Analytics.',
)
}