Improve error handling and add user tracking for webhooks

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/7f30ef0d-2f71-4e3c-8bcd-86b7fce895eb.jpg
This commit is contained in:
alphaeusmote
2025-04-10 03:29:57 +00:00
parent fa0ff7bb7d
commit aae5a27fe7
2 changed files with 16 additions and 4 deletions
+8 -1
View File
@@ -105,7 +105,14 @@ export class DatabaseStorage implements IStorage {
}
async getAllDomains(): Promise<Domain[]> {
return await db.select().from(domains);
try {
return await db.select().from(domains);
} catch (error) {
console.error("Error fetching domains:", error);
// If there's an error with the database query,
// return an empty array rather than throwing an exception
return [];
}
}
async createDomain(domain: InsertDomain): Promise<Domain> {