Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Error handling

Edward Cuic037e3def6e2
diff --git a/server/src/services/import/workers/queues.ts b/server/src/services/import/workers/queues.ts
index 56dd97f4f..53d883804 100644
--- a/server/src/services/import/workers/queues.ts
+++ b/server/src/services/import/workers/queues.ts
@@ -2,6 +2,10 @@ import boss from "../../../db/postgres/boss.js";
import { CSV_PARSE_QUEUE, DATA_INSERT_QUEUE } from "./jobs.js";
export const createJobQueues = async () => {
- await boss.createQueue(CSV_PARSE_QUEUE);
- await boss.createQueue(DATA_INSERT_QUEUE);
+ try {
+ await boss.createQueue(CSV_PARSE_QUEUE);
+ await boss.createQueue(DATA_INSERT_QUEUE);
+ } catch (error) {
+ throw new Error(`Failed to create job queues: ${error instanceof Error ? error.message : "Unknown error"}`);
+ }
}